Contents
Page-10
Prev
Next
Page+10
Index
ATN Program [file atn.clj]
- A global variable atnsent points to a list of words that
remain in the input sentence:
(GOOD CHINESE RESTAURANT IN LOS ALTOS)
- A global variable atnword points to the current word: GOOD
- (wordcat category ) tests whether atnword
is in the specified category. It can also translate the word, e.g.
(wordcat 'month) might return 3 if atnword is MARCH.
- (nextword) moves to the next word in the input
- (saveptr) saves the current sentence position on a stack,
atnsavesent.
- (success) pops a saved position off the stack.
- (fail) restores a saved position from the stack (restoring
atnsent and atnword) and returns nil.