; Test if current word is in category (defun cat (category) (get word category)) ; Define a lexicon. ; Arg is list of (category ( items )) ; Each item is word or (word value) (defun deflexicon (lst) (dolist (l lst) (let ((category (car l))) (setf (part-of-speech category) t) (dolist (word (cadr l)) (if (symbolp word) (setf (get word category) t) (setf (get (car word) category) (cadr word))) ) ) ) )
The lexicon and category testing can do multiple tasks:
Contents    Page-10    Prev    Next    Page+10    Index