mirror of https://github.com/explosion/spaCy.git
Strings has be to on vocab object
This commit is contained in:
parent
8356a2893a
commit
6b30cbaf0b
|
@ -32,7 +32,7 @@ p.u-text-large spaCy features a rule-matching engine that operates over tokens.
|
|||
doc = nlp(u"I prefer Siri to Google Now.")
|
||||
matches = matcher(doc)
|
||||
for ent_id, label, start, end in matches:
|
||||
print(nlp.strings[ent_id], nlp.strings[label], doc[start : end].text)
|
||||
print(nlp.vocab.strings[ent_id], nlp.vocab.strings[label], doc[start : end].text)
|
||||
entity = matcher.get_entity(ent_id)
|
||||
print(entity)
|
||||
|
||||
|
|
Loading…
Reference in New Issue