mirror of
https://github.com/explosion/spaCy.git
synced 2025-07-11 00:32:40 +03:00
* Whitespace
This commit is contained in:
parent
b27bd18d6e
commit
76a1f0481a
|
@ -267,7 +267,7 @@ cdef class Break:
|
||||||
return cost
|
return cost
|
||||||
else:
|
else:
|
||||||
return cost + 1
|
return cost + 1
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef inline int label_cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
cdef inline int label_cost(StateClass s, const GoldParseC* gold, int label) nogil:
|
||||||
return 0
|
return 0
|
||||||
|
@ -279,7 +279,7 @@ cdef int _get_root(int word, const GoldParseC* gold) nogil:
|
||||||
return -1
|
return -1
|
||||||
else:
|
else:
|
||||||
return word
|
return word
|
||||||
|
|
||||||
|
|
||||||
cdef class ArcEager(TransitionSystem):
|
cdef class ArcEager(TransitionSystem):
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -322,8 +322,9 @@ cdef class ArcEager(TransitionSystem):
|
||||||
cdef Transition lookup_transition(self, object name) except *:
|
cdef Transition lookup_transition(self, object name) except *:
|
||||||
if '-' in name:
|
if '-' in name:
|
||||||
move_str, label_str = name.split('-', 1)
|
move_str, label_str = name.split('-', 1)
|
||||||
label = self.label_ids[label_str]
|
label = self.strings[label_str]
|
||||||
else:
|
else:
|
||||||
|
move_str = name
|
||||||
label = 0
|
label = 0
|
||||||
move = MOVE_NAMES.index(move_str)
|
move = MOVE_NAMES.index(move_str)
|
||||||
for i in range(self.n_moves):
|
for i in range(self.n_moves):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user