Completed the lexical pattern generation method