Automatic term classification and information retrieval