mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 02:36:32 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
c36d4596bf
|
@ -140,7 +140,8 @@ def train(cmd, lang, output_dir, train_data, dev_data, n_iter=10, n_sents=0,
|
|||
with nlp.use_params(optimizer.averages):
|
||||
dill.dump(nlp, file_, -1)
|
||||
except:
|
||||
pass
|
||||
print("Error saving model")
|
||||
|
||||
|
||||
def _render_parses(i, to_render):
|
||||
to_render[0].user_data['title'] = "Batch %d" % i
|
||||
|
|
|
@ -57,7 +57,6 @@ def test_en_lemmatizer_punct(en_lemmatizer):
|
|||
def test_en_lemmatizer_lemma_assignment(EN):
|
||||
text = "Bananas in pyjamas are geese."
|
||||
doc = EN.make_doc(text)
|
||||
EN.tensorizer(doc)
|
||||
assert all(t.lemma_ == '' for t in doc)
|
||||
EN.tagger(doc)
|
||||
assert all(t.lemma_ != '' for t in doc)
|
||||
|
|
|
@ -52,6 +52,7 @@ def test_en_models_vectors(example):
|
|||
# this isn't a perfect test since this could in principle fail
|
||||
# in a sane model as well,
|
||||
# but that's very unlikely and a good indicator if something is wrong
|
||||
if example.vocab.vectors_length:
|
||||
vector0 = example[0].vector
|
||||
vector1 = example[1].vector
|
||||
vector2 = example[2].vector
|
||||
|
|
|
@ -22,7 +22,6 @@ def test_issue429(EN):
|
|||
matcher = Matcher(EN.vocab)
|
||||
matcher.add('TEST', merge_phrases, [{'ORTH': 'a'}])
|
||||
doc = EN.make_doc('a b c')
|
||||
EN.tensorizer(doc)
|
||||
EN.tagger(doc)
|
||||
matcher(doc)
|
||||
EN.entity(doc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user