mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
fb75eb52f1
|
@ -15,7 +15,7 @@ p Create the rule-based #[code PhraseMatcher].
|
|||
|
||||
+aside-code("Example").
|
||||
from spacy.matcher import PhraseMatcher
|
||||
matcher = Matcher(nlp.vocab, max_length=6)
|
||||
matcher = PhraseMatcher(nlp.vocab, max_length=6)
|
||||
|
||||
+table(["Name", "Type", "Description"])
|
||||
+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].
|
||||
|
||||
+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"))
|
||||
doc = nlp(u"Barack Obama lifts America one last time in emotional farewell")
|
||||
matches = matcher(doc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user