mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Make action_name optional in StepwiseState
This commit is contained in:
parent
4bb73b1a93
commit
e8c8aa08ce
|
@ -284,7 +284,9 @@ cdef class StepwiseState:
|
||||||
cdef Transition action = self.parser.moves.c[self.eg.guess]
|
cdef Transition action = self.parser.moves.c[self.eg.guess]
|
||||||
return self.parser.moves.move_name(action.move, action.label)
|
return self.parser.moves.move_name(action.move, action.label)
|
||||||
|
|
||||||
def transition(self, action_name):
|
def transition(self, action_name=None):
|
||||||
|
if action_name is None:
|
||||||
|
action_name = self.predict()
|
||||||
moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
|
moves = {'S': 0, 'D': 1, 'L': 2, 'R': 3}
|
||||||
if action_name == '_':
|
if action_name == '_':
|
||||||
action_name = self.predict()
|
action_name = self.predict()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user