Merge pull request #620 from savkov/patch-1

Missing import statement for spacy.matcher.Matcher
This commit is contained in:
Matthew Honnibal 2016-11-16 06:08:44 +11:00 committed by GitHub
commit af953cf2e6

View File

@ -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"}])