在Spacy上命名的实体识别,用于产品类别,如手机,未识别的车辆

时间:2018-03-22 18:33:10

标签: nlp spacy named-entity-recognition

对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_)

输出为空白(未执行打印)

1 个答案:

答案 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.