mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-06 05:10:21 +03:00
Restore formatting.
This commit is contained in:
parent
c7986591eb
commit
478f74db18
|
@ -15,40 +15,13 @@ from .test_underscore import clean_underscore # noqa: F401
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def doc(en_tokenizer):
|
def doc(en_tokenizer):
|
||||||
|
# fmt: off
|
||||||
text = "This is a sentence. This is another sentence. And a third."
|
text = "This is a sentence. This is another sentence. And a third."
|
||||||
heads = [1, 1, 3, 1, 1, 6, 6, 8, 6, 6, 12, 12, 12, 12]
|
heads = [1, 1, 3, 1, 1, 6, 6, 8, 6, 6, 12, 12, 12, 12]
|
||||||
deps = [
|
deps = ["nsubj", "ROOT", "det", "attr", "punct", "nsubj", "ROOT", "det",
|
||||||
"nsubj",
|
"attr", "punct", "ROOT", "det", "npadvmod", "punct"]
|
||||||
"ROOT",
|
ents = ["O", "O", "B-ENT", "I-ENT", "I-ENT", "I-ENT", "I-ENT", "O", "O",
|
||||||
"det",
|
"O", "O", "O", "O", "O"]
|
||||||
"attr",
|
|
||||||
"punct",
|
|
||||||
"nsubj",
|
|
||||||
"ROOT",
|
|
||||||
"det",
|
|
||||||
"attr",
|
|
||||||
"punct",
|
|
||||||
"ROOT",
|
|
||||||
"det",
|
|
||||||
"npadvmod",
|
|
||||||
"punct",
|
|
||||||
]
|
|
||||||
ents = [
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"B-ENT",
|
|
||||||
"I-ENT",
|
|
||||||
"I-ENT",
|
|
||||||
"I-ENT",
|
|
||||||
"I-ENT",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
"O",
|
|
||||||
]
|
|
||||||
# fmt: on
|
# fmt: on
|
||||||
tokens = en_tokenizer(text)
|
tokens = en_tokenizer(text)
|
||||||
lemmas = [t.text for t in tokens] # this is not correct, just a placeholder
|
lemmas = [t.text for t in tokens] # this is not correct, just a placeholder
|
||||||
|
|
Loading…
Reference in New Issue
Block a user