Syntax and Semantics in a Word-Sequence Recognition System