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