Word Category Testing
; Test if current word is in category
; (wordcat 'month) where atnword = oct
(defn wordcat [category]
(if (= category 'number)
(and (number? atnword) atnword)
(if (= category 'symbol)
(and (symbol? atnword) atnword)
(let [catlst (assocl category lexicon)
wd (findwd atnword (second catlst))]
(if (cons? wd)
(if (empty? (rest wd))
(first wd)
(second wd))
wd) ))))
The lexicon and category testing can do multiple tasks: