Code Comments
Programming Forum and web based access to our favorite programming groups.Hello, How do I extract the grammar from a set of sentences? Any pointer to a simple system, or code, or article in Prolog on how to accomplish this goal? Thanks. basi
Post Follow-up to this messagebasi wrote: > Hello, > How do I extract the grammar from a set of sentences? Any pointer to a > simple system, or code, or article in Prolog on how to accomplish this > goal? Thanks. > basi One posibilty is, first, convert the minimal sentence items (words and symbols?) to tokens, and second, use a "sintactic pattern recongnition" algorithm with its "supervised"/"unsupervised learning"? (in quotes, the terms you can google for). However, things are easier if you do not need to extract the grammar (you know or write manually it), but just analize the sentences versus the grammar (="parse" it).
Post Follow-up to this message"basi" <basiibarra@yahoo.com> wrote > How do I extract the grammar from a set of sentences? Any pointer to a > simple system, or code, or article in Prolog on how to accomplish this > goal? Thanks. > basi It isn't a simple problem. What you're essentially saying is "how do I do inductive logic programming?", which has become a whole academic field to itself. A good paper which applies ILP to the problem of finding a grammar from examples is: www.clp.ox.ac.uk/people/staff/pulma...ing_papers2.pdf Matthew Huntbach
Post Follow-up to this messageIts not easy to do this with the ordinary features of Prolog, so Prolog has special features to deal with grammar. Look for the terms "DCG" and "Definite Clause Grammar". If you have a good book on Prolog, look up these terms in the index. There is a tutorial (i.e. website) which introduces Prolog's DCG features. Its called "Learn Prolog Now!". You can find this by using Google, or you can find its URL in the FAQ for comp.lang.prolog . -- Martin Sondergaard. The website you scannot be located but endless others exist. -- A poem.
Post Follow-up to this messageThank you for your reply. Yes, I now realize that this is not a simple subject. I goggled "grammar generator", which led me to many many sites, and realized quickly the complexity. I am working on the "grammar" of prefixation of a concatenative language. As I was doing the "manual" induction, I had thought that for a small set of vocabulary, there must be an interactive system out there that the user can "nudged" into the right direction to come up with the rules. Sigh. Thanks for the reference. basi Matthew Huntbach wrote: > "basi" <basiibarra@yahoo.com> wrote > to a this > > It isn't a simple problem. What you're essentially saying is "how do I > do inductive logic programming?", which has become a whole academic > field to itself. > > A good paper which applies ILP to the problem of finding a grammar > from examples is: > > www.clp.ox.ac.uk/people/staff/pulma...ing_papers2.pdf > > Matthew Huntbach
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.