From 614d45ea58eb334e8f31ba1187e7b072f45405fe Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 10 May 2018 15:38:24 +0200 Subject: [PATCH] Set a more aggressive threshold on the max violn update --- spacy/syntax/_beam_utils.pyx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacy/syntax/_beam_utils.pyx b/spacy/syntax/_beam_utils.pyx index 2862f3ed2..a6b87f354 100644 --- a/spacy/syntax/_beam_utils.pyx +++ b/spacy/syntax/_beam_utils.pyx @@ -209,7 +209,8 @@ def update_beam(TransitionSystem moves, int nr_feature, int max_steps, # Track the "maximum violation", to use in the update. for i, violn in enumerate(violns): violn.check_crf(pbeam[i], gbeam[i]) - if pbeam[i].loss > 0 and pbeam[i].min_score > (gbeam[i].score * 1.5): + # Use 'early update' if best gold is way out of contention. + if pbeam[i].loss > 0 and pbeam[i].min_score > (gbeam[i].score * 5.00): pbeam.dones[i] = True gbeam.dones[i] = True histories = []