mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-11 00:50:33 +03:00
cleanup
This commit is contained in:
parent
54855e3f3a
commit
ed71f5298a
|
@ -6,7 +6,6 @@ from spacy.pipeline.defaults import default_parser
|
|||
from spacy.pipeline import DependencyParser
|
||||
from spacy.tokens import Doc
|
||||
from spacy.syntax.nonproj import projectivize
|
||||
from spacy.syntax.stateclass import StateClass
|
||||
from spacy.syntax.arc_eager import ArcEager
|
||||
|
||||
|
||||
|
@ -41,26 +40,6 @@ def arc_eager(vocab):
|
|||
return moves
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def words():
|
||||
return ["a", "b"]
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def doc(words, vocab):
|
||||
if vocab is None:
|
||||
vocab = Vocab()
|
||||
return Doc(vocab, words=list(words))
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def gold(doc, words):
|
||||
if len(words) == 2:
|
||||
return GoldParse(doc, words=["a", "b"], heads=[0, 0], deps=["ROOT", "right"])
|
||||
else:
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
def test_oracle_four_words(arc_eager, vocab):
|
||||
words = ["a", "b", "c", "d"]
|
||||
heads = [1, 1, 3, 3]
|
||||
|
|
Loading…
Reference in New Issue
Block a user