mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-24 17:06:29 +03:00
Merge pull request #620 from savkov/patch-1
Missing import statement for spacy.matcher.Matcher
This commit is contained in:
commit
af953cf2e6
|
@ -21,6 +21,7 @@ p
|
||||||
| callable, to receive a list of #[code (ent_id, start, end)] tuples:
|
| callable, to receive a list of #[code (ent_id, start, end)] tuples:
|
||||||
|
|
||||||
+code.
|
+code.
|
||||||
|
from spacy.matcher import Matcher
|
||||||
matcher = Matcher(nlp.vocab)
|
matcher = Matcher(nlp.vocab)
|
||||||
matcher.add_pattern("HelloWorld", [{LOWER: "hello"}, {IS_PUNCT: True}, {LOWER: "world"}])
|
matcher.add_pattern("HelloWorld", [{LOWER: "hello"}, {IS_PUNCT: True}, {LOWER: "world"}])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user