PLOGHELP PHRASE                               Chris Mellish, August 1982
                                 Revised by Kathryn Seifert  August 1986

Predicate for invoking goals involving grammar rules

    ?- phrase(<prologterm:P>, <list:S>).

Keywords: grammar, natural language


This predicate makes it easier to invoke goals involving predicates
defined by grammar rules.   It can be used to determine whether a list
of words S representing a phrase or sentence conforms to the pattern
specified by a particular grammar rule.

The first argument, P, should be a goal involving the predicate defined
by the grammar rule, but should not contain extra arguments for the
input and output strings (ie it should look similar to the head of the
grammar rule).  The second argument, S, should be the list of words to
be worked on.  It is assumed that the whole of the list is to be used up
by the grammar rule.

For example, if a predicate 's' was defined by a rule like:

  s(s(X, Y)) --> np(X), vp(Y).

then an appropriate call of 'phrase' would be:

  ?- phrase(s(X), [the, man, hit, me]).

This would be completely equivalent to:

  ?- s(X, [the, man, hit, me], []).


-- RELATED DOCUMENTATION ----------------------------------------------

PLOGHELP * GRAMMAR_RULE
 Prolog facilities for expressing definite clause grammars

PLOGHELP * GRAMMARS
 Overview of HELP files dealing with grammars and natural language

TEACH * GRAMMAR_RULES
 Tutorial introduction to Prolog grammar rules
