Fix formatting

This commit is contained in:
ines 2017-10-24 16:22:37 +02:00
parent 0e081d0167
commit 90601cf1b3

View File

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