You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made an example as below by using spacy with lookup dependencies.
entity = Entity(
keywords_list=["Japan", "Tokyo", "US"],
label='from_location',
case_sensitive=True)
nlp.add_pipe(entity, name='location')
entity2 = Entity(
keywords_list=["Korea", "Japan", "US", "Tokyo"],
label='to_location',
case_sensitive=True)
nlp.add_pipe(entity2, name='to_location')
doc = nlp(
u"I want to go to Tokyo Japan tomorrow morning from US. Can you book a ticket?")
for token in doc:
if token._.is_entity:
pprint([(token.text, token._.canonical, token.ent_type_, token.pos_, token.idx, token.idx + len(token.text))])
I made an example as below by using spacy with lookup dependencies.
Here is the result:
However, my expectation is:
Is there anyone know why?
The text was updated successfully, but these errors were encountered: