From e775e053136326bc7611076a2e13a240cc25f0ac Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 8 Apr 2015 00:35:19 +0200 Subject: [PATCH] * Use merge_mwe=False in evaluation in train.py --- bin/parser/train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/parser/train.py b/bin/parser/train.py index b54318eb2..9984d4f97 100755 --- a/bin/parser/train.py +++ b/bin/parser/train.py @@ -219,7 +219,7 @@ def train(Language, train_loc, model_dir, n_iter=15, feat_set=u'basic', seed=0, scorer = Scorer() for raw_text, segmented_text, annot_tuples in gold_tuples: # Eval before train - tokens = nlp(raw_text) + tokens = nlp(raw_text, merge_mwes=False) gold = GoldParse(tokens, annot_tuples) scorer.score(tokens, gold, verbose=False) @@ -248,7 +248,7 @@ def evaluate(Language, dev_loc, model_dir, gold_preproc=False, verbose=True): gold_tuples = read_docparse_file(dev_loc) scorer = Scorer() for raw_text, segmented_text, annot_tuples in gold_tuples: - tokens = nlp(raw_text) + tokens = nlp(raw_text, merge_mwes=False) gold = GoldParse(tokens, annot_tuples) scorer.score(tokens, gold, verbose=verbose) return scorer