mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
Fix indentation errors
This commit is contained in:
parent
405347b46f
commit
26dc3f3ebf
|
@ -9,51 +9,53 @@
|
||||||
p A full example can be found #[a(href="https://github.com/" + SOCIAL.github + "/spaCy/blob/master/examples/matcher_example.py") here].
|
p A full example can be found #[a(href="https://github.com/" + SOCIAL.github + "/spaCy/blob/master/examples/matcher_example.py") here].
|
||||||
|
|
||||||
+table(["Usage", "Description"])
|
+table(["Usage", "Description"])
|
||||||
+row
|
+row
|
||||||
+cell #[code.lang-python nlp(doc)]
|
+cell #[code.lang-python nlp(doc)]
|
||||||
+cell As part of annotation pipeline.
|
+cell As part of annotation pipeline.
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code.lang-python nlp.matcher(doc)]
|
+cell #[code.lang-python nlp.matcher(doc)]
|
||||||
+cell Explicit invocation.
|
+cell Explicit invocation.
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code.lang-python nlp.matcher.add(u'FooCorp', u'ORG', {}, [[{u'ORTH': u'Foo'}]])]
|
+cell #[code.lang-python nlp.matcher.add(u'FooCorp', u'ORG', {}, [[{u'ORTH': u'Foo'}]])]
|
||||||
+cell Add a pattern to match.
|
+cell Add a pattern to match.
|
||||||
|
|
||||||
+section("matcher-init")
|
+section("matcher-init")
|
||||||
+h(3, "matcher-init") __init__(self, vocab, patterns)
|
+h(3, "matcher-init") __init__(self, vocab, patterns)
|
||||||
+table(["Name", "Type", "Description"])
|
|
||||||
+row
|
|
||||||
+cell vocab
|
|
||||||
+cell #[code.lang-python spacy.vocab.Vocab]
|
|
||||||
+cell Reference to the shared vocabulary object.
|
|
||||||
|
|
||||||
+row
|
+table(["Name", "Type", "Description"])
|
||||||
+cell patterns
|
+row
|
||||||
+cell #[code {entity_key: (etype, attrs, specs)}]
|
+cell vocab
|
||||||
+cell.
|
+cell #[code.lang-python spacy.vocab.Vocab]
|
||||||
Initial patterns to match. See #[code Matcher.add]
|
+cell Reference to the shared vocabulary object.
|
||||||
|
|
||||||
|
+row
|
||||||
|
+cell patterns
|
||||||
|
+cell #[code {entity_key: (etype, attrs, specs)}]
|
||||||
|
+cell.
|
||||||
|
Initial patterns to match. See #[code Matcher.add]
|
||||||
|
|
||||||
+section("matcher-add")
|
+section("matcher-add")
|
||||||
+h(3, "matcher-add") add(self, entity_key, etype, attrs, specs)
|
+h(3, "matcher-add") add(self, entity_key, etype, attrs, specs)
|
||||||
+table(["Name", "Type", "Description"])
|
|
||||||
+row
|
+table(["Name", "Type", "Description"])
|
||||||
+cell entity_key
|
+row
|
||||||
+cell unicode or int
|
+cell entity_key
|
||||||
+cell Your arbitrary ID string (or its integer encoding)
|
+cell unicode or int
|
||||||
+row
|
+cell Your arbitrary ID string (or its integer encoding)
|
||||||
+cell etype
|
+row
|
||||||
+cell unicode or int
|
+cell etype
|
||||||
+cell A pre-registered entity type, e.g. u'PERSON', u'ORG', etc.
|
+cell unicode or int
|
||||||
+row
|
+cell A pre-registered entity type, e.g. u'PERSON', u'ORG', etc.
|
||||||
+cell attrs
|
+row
|
||||||
+cell #[code dict]
|
+cell attrs
|
||||||
+cell Placeholder for future support of entity attributes.
|
+cell #[code dict]
|
||||||
+row
|
+cell Placeholder for future support of entity attributes.
|
||||||
+cell specs
|
+row
|
||||||
+cell #[code [[{int: unicode}]]]
|
+cell specs
|
||||||
+cell A list of surface forms, where each surface form is defined as a list of token definitions, and each token definition is a dictionary mapping attribute IDs to attribute values.
|
+cell #[code [[{int: unicode}]]]
|
||||||
|
+cell A list of surface forms, where each surface form is defined as a list of token definitions, and each token definition is a dictionary mapping attribute IDs to attribute values.
|
||||||
|
|
||||||
+section("matcher-saveload")
|
+section("matcher-saveload")
|
||||||
+h(3, "matcher-saveload")
|
+h(3, "matcher-saveload")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user