mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 17:24:41 +03:00
Fix formatting
This commit is contained in:
parent
0e081d0167
commit
90601cf1b3
|
@ -23,7 +23,7 @@ p
|
|||
+code.
|
||||
from spacy.matcher import Matcher
|
||||
from spacy.attrs import IS_PUNCT, LOWER
|
||||
|
||||
|
||||
matcher = Matcher(nlp.vocab)
|
||||
matcher.add_pattern("HelloWorld", [{LOWER: "hello"}, {IS_PUNCT: True}, {LOWER: "world"}])
|
||||
|
||||
|
@ -60,8 +60,8 @@ p
|
|||
+h(2, "quantifiers") Using quantifiers
|
||||
|
||||
p
|
||||
| Token specifiers may have quantifiers attached to them, by setting the "OP" key
|
||||
| to one of the following values:
|
||||
| Token specifiers may have quantifiers attached to them, by setting the
|
||||
| #[code "OP"] key to one of the following values:
|
||||
|
||||
+table([ "Name", "Description", "Example"])
|
||||
+row
|
||||
|
@ -85,8 +85,9 @@ p
|
|||
+cell optional, max one
|
||||
|
||||
p
|
||||
| Thus the following matcher will match "Hello, World" or "Hello world" or "Hello - - world":
|
||||
|
||||
| Thus the following matcher will match "Hello, World" or "Hello world" or
|
||||
| "Hello - - world":
|
||||
|
||||
+code.
|
||||
matcher = Matcher(nlp.vocab)
|
||||
matcher.add_pattern("HelloWorld", [{LOWER: "hello"}, {IS_PUNCT: True, 'OP': '*'}, {LOWER: "world"}])
|
||||
|
|
Loading…
Reference in New Issue
Block a user