% file: 02-sentence.p % defines vocabulary, i.e., sentence is just a noun % adds concept of number :- ['02-process.p']. :- ['02-dictionary.p']. sentence --> assertion, period. sentence --> exclamation, emark. sentence --> query, qmark. sentence --> []. assertion --> np(_Number). exclamation --> np(_Number). query --> np(_Number). np(Number) --> noun(Number). /* noun(singular) --> [bluebird]. noun(singular) --> [woodpecker]. noun(singular) --> [anemone]. noun(singular) --> [lily]. */ noun(singular) --> [Word], { in_dictionary(Word,Entry), singular_of(_,Word,Entry), noun_p(Word) }. /* noun(plural) --> [bluebirds]. noun(plural) --> [woodpeckers]. noun(plural) --> [anemones]. noun(plural) --> [lilies]. */ noun(plural) --> [Word], { in_dictionary(Word,Entry), plural_of(_,Word,Entry), noun_p(Word) }. period --> ['.']. emark --> ['!']. qmark --> ['?'].