对spcay上的NER的描述意味着它有一个分类实体作为产品(车辆,食品等)但它们根本不被识别。如果我错过任何东西,任何想法。我试过给出简单的句子。 sample_String =“我用车”,“我用手机”,“我吃饭吃午饭”等等。
import spacy
import en_core_web_md
nlp = en_core_web_md.load()
a = nlp(" I eat rice for lunch")
for ent in a.ents:
print(a.text, a.start_char, a.end_char, a.label_)
输出为空白(未执行打印)
答案 0 :(得分:0)
Named Entity Recognition requires Named Entities. "rice, car, phone ..." are nouns and not Named Entities. Examples of Named Entities are "Galaxy 5, Toyota, Honda, iPhone, etc."
In other words, Named Entities are similar to proper nouns. Spacy NER won't work on just nouns that don't refer to specific models, brands, etc.