Fix typos in PhraseMatcher docs

This commit is contained in:
ines 2017-10-04 16:12:06 +02:00
parent bd8e84998a
commit bb13aa4bf3
1 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ p Create the rule-based #[code PhraseMatcher].
+aside-code("Example"). +aside-code("Example").
from spacy.matcher import PhraseMatcher from spacy.matcher import PhraseMatcher
matcher = Matcher(nlp.vocab, max_length=6) matcher = PhraseMatcher(nlp.vocab, max_length=6)
+table(["Name", "Type", "Description"]) +table(["Name", "Type", "Description"])
+row +row
@ -41,9 +41,9 @@ p Create the rule-based #[code PhraseMatcher].
p Find all token sequences matching the supplied patterns on the #[code Doc]. p Find all token sequences matching the supplied patterns on the #[code Doc].
+aside-code("Example"). +aside-code("Example").
from spacy.matcher import Matcher from spacy.matcher import PhraseMatcher
matcher = Matcher(nlp.vocab) matcher = PhraseMatcher(nlp.vocab)
matcher.add('OBAMA', None, nlp(u"Barack Obama")) matcher.add('OBAMA', None, nlp(u"Barack Obama"))
doc = nlp(u"Barack Obama lifts America one last time in emotional farewell") doc = nlp(u"Barack Obama lifts America one last time in emotional farewell")
matches = matcher(doc) matches = matcher(doc)