From e772b48dcd2188e0b6093ececb356337ad01a22e Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Fri, 5 Jun 2015 02:29:03 +0200 Subject: [PATCH] * Skip sentences of length 1 in training --- bin/parser/train.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/parser/train.py b/bin/parser/train.py index 5a49e546f..87a9aaad1 100755 --- a/bin/parser/train.py +++ b/bin/parser/train.py @@ -178,6 +178,8 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic', else: sents = _merge_sents(sents) for annot_tuples, ctnt in sents: + if len(annot_tuples[1]) == 1: + continue score_model(scorer, nlp, raw_text, annot_tuples, train_tags) if raw_text is None: tokens = nlp.tokenizer.tokens_from_list(annot_tuples[1])