Basic-English-Grammar is a lisp system for working with the English grammar data from the CMU AI repository (original authors: John Lawler and Dave Keiras, University of Michigan).

The original data is in the public domain, as is the new lisp system.

The lisp library exports a single function, grammar-of, which takes a string and returns a list of grammatical categories that the string is known to fall into (NIL if the string is an unknown word). For example:

CL-USER> (beg:grammar-of "write")
CL-USER> (beg:grammar-of "right")
CL-USER> (beg:grammar-of "wrote")
CL-USER> (beg:grammar-of "writer")

Basic-English-Grammar is ASDF-installable.

ASDF-install package (obsolete)

Natural Language Processing