Optimized lexicon lookup