mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 01:16:28 +03:00
Update Matcher API docs
This commit is contained in:
parent
0cabf9e13f
commit
e3256e7406
|
@ -79,10 +79,9 @@ p Find all token sequences matching the supplied patterns on the #[code Doc].
|
||||||
+cell returns
|
+cell returns
|
||||||
+cell list
|
+cell list
|
||||||
+cell
|
+cell
|
||||||
| A list of#[code (entity_key, label_id, start, end)] tuples,
|
| A list of #[code (match_id, start, end)] tuples, describing the
|
||||||
| describing the matches. A match tuple describes a
|
| matches. A match tuple describes a span #[code doc[start:end]].
|
||||||
| #[code span doc[start:end]]. The #[code label_id] and
|
| The #[code match_id] is the ID of the added match pattern.
|
||||||
| #[code entity_key] are both integers.
|
|
||||||
|
|
||||||
+h(2, "pipe") Matcher.pipe
|
+h(2, "pipe") Matcher.pipe
|
||||||
+tag method
|
+tag method
|
||||||
|
@ -119,7 +118,7 @@ p Match a stream of documents, yielding them in turn.
|
||||||
p
|
p
|
||||||
| Add one or more patterns to the matcher, along with a callback function
|
| Add one or more patterns to the matcher, along with a callback function
|
||||||
| to handle the matches. The callback function will receive the arguments
|
| to handle the matches. The callback function will receive the arguments
|
||||||
| #[code matcher], #[code doc], #[code id] and #[code matches].
|
| #[code matcher], #[code doc], #[code i] and #[code matches].
|
||||||
|
|
||||||
+aside-code("Example").
|
+aside-code("Example").
|
||||||
from spacy.matcher import Matcher
|
from spacy.matcher import Matcher
|
||||||
|
@ -153,4 +152,4 @@ p
|
||||||
+cell function
|
+cell function
|
||||||
+cell
|
+cell
|
||||||
| Callback function to act on matches. Takes the arguments
|
| Callback function to act on matches. Takes the arguments
|
||||||
| #[code matcher], #[code doc], #[code id] and #[code matches].
|
| #[code matcher], #[code doc], #[code i] and #[code matches].
|
||||||
|
|
Loading…
Reference in New Issue
Block a user