尝试使用mitie进行实体抽取,先记录一下,后续改为java版本的。 import mitie model_file='/home/test/rasa_nlu_chi/data/total_word_feature_extractor_zh.dat' extractor = mitie.total_word_feature_extractor(model_file) feats = extractor.get_feature_vector("我") print ("First 5 features of word 'home'", feats[0:]) import sys, os from mitie import * sample = ner_training_instance(["I", "am", "looking", "for", "some", "cheap", "Mexican", "food", "."]) sample.add_entity(xrange(5,6), "pricerange") sample.add_entity(xrange(6,7), "cuisine") sample2 = ner_training_instance(["show", "me", "indian", "restaurants", "in", "the", "centre",