added lexical_classification function