From 99dbf8a38c0fb20c35e901a0166e97819ba51770 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Thu, 16 Apr 2015 01:36:22 +0200 Subject: [PATCH] * Fix error type in lookup_transition --- spacy/syntax/ner.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/syntax/ner.pyx b/spacy/syntax/ner.pyx index e8e8ee5da..8622d7894 100644 --- a/spacy/syntax/ner.pyx +++ b/spacy/syntax/ner.pyx @@ -110,7 +110,7 @@ cdef class BiluoPushDown(TransitionSystem): if self.c[i].move == move and self.c[i].label == label: return self.c[i] else: - raise Exception(name) + raise KeyError(name) cdef Transition init_transition(self, int clas, int move, int label) except *: # TODO: Apparent Cython bug here when we try to use the Transition()