Strings has be to on vocab object

This commit is contained in:
chssch 2016-10-22 15:05:41 +02:00
parent 8356a2893a
commit 6b30cbaf0b
1 changed files with 1 additions and 1 deletions

View File

@ -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)