A user defined a sentence and expected to get entities as an output but instead getting an empty list.

822    Asked by FionaDickens in Data Science , Asked on Nov 13, 2019
Answered by Fiona Dickens

Here is the code.

image

Here, ‘Alphabet’ and ‘China’ should be defined as entities

To extract the entities from a text, we need to do the following.

image

Here, Spacy returned China as an entity. The reason is that Spacy always looks up the surrounding words to understand the nature of the entity. So to add Alphabet as the entity, we need to add ‘The’ before it to demonstrate it as a noun.

image

Now Spacy recognized Alphabet as an organization.



Your Answer

Interviews

Parent Categories