How does the prologue work as an intelligent language?

I wrote a set of rules in the prologue if the rule matches a specific action. something like:

rule_second_question(X, Y, X, W):-
    (
        LINK_BASE == 'G',
        is_verb_form(X),
        aggregate_all(X, linkage(W, _, _, _, _, _, _, _, _, 'RS'), Y),
        writeln(Y),
        Count == 1,
        SUBJECT = X,
        nb_linkval(rule, 'twol')
    )

      

I could write such rules for python, C ++ also if

, else

.

My program is about linguistic. I don't understand how the prologue can differentiate between comparison with another programming language.

Any help from the example would be greatly appreciated.

+3


source to share


1 answer


The power of Prolog is derived from boolean variables combined with a built-in search algorithm and expressive and uniform data structuring tools.

It implements a relational data model, but more structured values ​​than SQL. In a sense, I think of it as antesignan "No SQL" language.

Thus, we can encode - with care - relationships between complex data structures, such as those of early NLP research.

Some of them easily implement syntactic sugar (so-called DGCs - independent cluster grammars) and then let you write executable ASTs. If you think the language is (more or less) as old as C, you can appreciate its charm.



Then NLP research was drawn into a more productive paradigm: statistical analysis. A prologue that is not arithmetic oriented loses its fashion.

See the Attempto project for a valuable resource implemented in Prolog.

Also, my preferred book on Prolog by Pereira-Shieber is freely available . He introduces Prolog using NLP.

+3


source







All Articles