Template analysis: bridging the gap between grammar and the lexicon