From d249e2f7f30af76470ae4a02fd2203ed641f6f91 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Tue, 29 Mar 2016 13:04:33 +1100 Subject: [PATCH] * Improve error message in bin/parser/train.py --- bin/parser/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/parser/train.py b/bin/parser/train.py index 642ed53e7..2b9e24051 100755 --- a/bin/parser/train.py +++ b/bin/parser/train.py @@ -141,7 +141,7 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic', nlp.tagger(tokens) gold = GoldParse(tokens, annot_tuples) if not gold.is_projective: - raise Exception("Non-projective sentence in training: %s" % annot_tuples) + raise Exception("Non-projective sentence in training: %s" % annot_tuples[1]) loss += nlp.parser.train(tokens, gold) nlp.entity.train(tokens, gold) nlp.tagger.train(tokens, gold.tags)