mirror of
https://github.com/explosion/spaCy.git
synced 2025-04-25 03:13:41 +03:00
* Skip sentences of length 1 in training
This commit is contained in:
parent
6bf35cecc3
commit
e772b48dcd
|
@ -178,6 +178,8 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic',
|
||||||
else:
|
else:
|
||||||
sents = _merge_sents(sents)
|
sents = _merge_sents(sents)
|
||||||
for annot_tuples, ctnt in sents:
|
for annot_tuples, ctnt in sents:
|
||||||
|
if len(annot_tuples[1]) == 1:
|
||||||
|
continue
|
||||||
score_model(scorer, nlp, raw_text, annot_tuples, train_tags)
|
score_model(scorer, nlp, raw_text, annot_tuples, train_tags)
|
||||||
if raw_text is None:
|
if raw_text is None:
|
||||||
tokens = nlp.tokenizer.tokens_from_list(annot_tuples[1])
|
tokens = nlp.tokenizer.tokens_from_list(annot_tuples[1])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user