3 ms·
It looks good at the start, but it doesn't deliver. I think that it depends on the domain. Part of my PhD project was making a natural language generator for a
by danieldk 10y ago
It looks good at the start, but it doesn't deliver.
I think that it depends on the domain. Part of my PhD project was making a natural language generator for a Dutch grammar/lexicon. The grammar was developed for a high-coverage parser. Due to Prolog's declarative nature, the grammar, lexicon, and productive lexicon could be used with very few changes. (E.g. in productive lexicon, for parsing one would derive a root and lexicosyntactic information. In generation, you start with a root and underspecified lexicosyntactic information and derive a word with its full lexicosyntactic information.)
One could argue that Prolog was primarily used for data (grammar rules, lexicon). And it is true that people have developed systems that target unification grammar specifically. But in this domain, Prolog gives you a good local optimum: feature structures are trivially converted to Prolog terms, feature structure unification becomes Prolog term unification, Prolog's metaprogramming facilities make it easy to compile/rewrite grammar rules (e.g. in order to exploit first-argument indexing in particular scenarios).
That said, I didn't and wouldn't use Prolog outside that domain and haven't written Prolog since. Also, I think Prolog has serious deficiencies, e.g. it can be quite tricky to write good steadfast[1] predicates.
[1] http://permalink.gmane.org/gmane.comp.lang.swi-prolog.general/3987 http://permalink.gmane.org/gmane.comp.lang.swi-prolog.genera...
- YeGoblynQueenne 10y ago>> One could argue that Prolog was primarily used for data (grammar rules, lexicon). Weeell, more to the point: in Prolog data is your program so anything you do is data manipulation (or program execution, depending on how you choose to think about it).