Recognition of named entities

Report a typo

Have a look at the code below. It recognizes named entities in your sentence. Unfortunately, there is an error in one line. Find the line with the error, and print the right version of it.

import stanza


stanza.download("en")
nlp = stanza.Pipeline(lang="en", processors="tokenize, ner")
doc = nlp('I go to New York every summer.')
for ent in doc.ent:
  print(ent.text, ':', ent.type)
Enter a short text
___

Create a free account to access the full topic