mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-13 05:07:03 +03:00
Tidy up and auto-format
This commit is contained in:
parent
df0b68f60e
commit
90043a6f9b
|
@ -1376,8 +1376,6 @@ class Language:
|
||||||
docs = (self.make_doc(text) for text in texts)
|
docs = (self.make_doc(text) for text in texts)
|
||||||
for pipe in pipes:
|
for pipe in pipes:
|
||||||
docs = pipe(docs)
|
docs = pipe(docs)
|
||||||
|
|
||||||
nr_seen = 0
|
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
yield doc
|
yield doc
|
||||||
|
|
||||||
|
|
|
@ -56,15 +56,7 @@ def test_lex_attrs_like_number(en_tokenizer, text, match):
|
||||||
assert tokens[0].like_num == match
|
assert tokens[0].like_num == match
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize("word", ["third", "Millionth", "100th", "Hundredth"])
|
||||||
"word",
|
|
||||||
[
|
|
||||||
"third",
|
|
||||||
"Millionth",
|
|
||||||
"100th",
|
|
||||||
"Hundredth",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
def test_en_lex_attrs_like_number_for_ordinal(word):
|
def test_en_lex_attrs_like_number_for_ordinal(word):
|
||||||
assert like_num(word)
|
assert like_num(word)
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,6 @@ def test_overfitting_IO():
|
||||||
|
|
||||||
def test_tagger_requires_labels():
|
def test_tagger_requires_labels():
|
||||||
nlp = English()
|
nlp = English()
|
||||||
tagger = nlp.add_pipe("tagger")
|
nlp.add_pipe("tagger")
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
optimizer = nlp.begin_training()
|
nlp.begin_training()
|
||||||
|
|
|
@ -135,6 +135,7 @@ TRAIN_DATA = [
|
||||||
("Eat blue ham", {"tags": ["V", "J", "N"]}),
|
("Eat blue ham", {"tags": ["V", "J", "N"]}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_tok2vec_listener():
|
def test_tok2vec_listener():
|
||||||
orig_config = Config().from_str(cfg_string)
|
orig_config = Config().from_str(cfg_string)
|
||||||
nlp, config = util.load_model_from_config(orig_config, auto_fill=True, validate=True)
|
nlp, config = util.load_model_from_config(orig_config, auto_fill=True, validate=True)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user