1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
<HTML>
<HEAD>
<TITLE>Language (Subsystem of AIMA Code)</TITLE>
<!-- Changed by: Peter Norvig, 30-Oct-1996 -->
</HEAD>
<BODY bgcolor="#ffffff">
<h1>Language (Subsystem of AIMA Code)</h1>
The <b>language</b> subsystem covers the natural language processing
code from Chapters 22 and 23 of the book. The main parsing function
is <tt>chart-parse</tt>, but it returns a chart, which is not very
useful in itself, so most of the <A HREF="test-language.lisp">test
examples</A> call <tt>chart-parses</tt>, which returns a list of
parses for the complete input string, or <tt>meanings</tt> which pulls
out the semantic component of each parse.<P>
Several sample <A HREF="domains/grammars.lisp">grammars</A> are shown.
For the most part, they follow the notation from the book. The
differences are:
<ul>
<li> Obviously, the grammars are in Lisp notation.
<li> The symbol <tt>$w</tt> on the left-hand side of a lexical rule stands
for the word itself on the right-hand side. This allows you to put multiple
lexical entries on one line.
<li> The grammar can specify a list of <tt>:unknown-word-cats</tt>. That means
that when an unknown word is encountered in the input, it is assumed to be
one of these categories.
</ul>
<LISP>
</BODY>
</HTML>
|