mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-10 16:22:29 +03:00
Fix parser oracle
This commit is contained in:
parent
46b6197248
commit
38ad6c7b6a
|
@ -70,6 +70,8 @@ cdef class TransitionSystem:
|
||||||
return state
|
return state
|
||||||
|
|
||||||
def get_oracle_sequence(self, Example example, _debug=False):
|
def get_oracle_sequence(self, Example example, _debug=False):
|
||||||
|
if not self.has_gold(example):
|
||||||
|
return []
|
||||||
states, golds, _ = self.init_gold_batch([example])
|
states, golds, _ = self.init_gold_batch([example])
|
||||||
if not states:
|
if not states:
|
||||||
return []
|
return []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user