mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 09:26:27 +03:00
* Neaten oracle
This commit is contained in:
parent
66cb4f96e1
commit
8f84e8a78b
|
@ -32,16 +32,14 @@ cdef int set_accept_if_oracle(Move* moves, int n, State* s,
|
||||||
g_start = g_starts[s.curr.start]
|
g_start = g_starts[s.curr.start]
|
||||||
g_end = g_ends[s.curr.start]
|
g_end = g_ends[s.curr.start]
|
||||||
accept_o = False
|
accept_o = False
|
||||||
if g_start == s.curr.start and g_end >= s.i:
|
if g_start == s.curr.start and g_end == s.i:
|
||||||
if g_end == s.i:
|
|
||||||
accept_r = True
|
accept_r = True
|
||||||
r_label = g_labels[s.curr.start]
|
r_label = g_labels[s.curr.start]
|
||||||
accept_s = False
|
accept_s = False
|
||||||
else:
|
elif g_start == s.curr.start and g_end > s.i:
|
||||||
accept_s = True
|
accept_s = True
|
||||||
accept_r = False
|
accept_r = False
|
||||||
else:
|
elif g_starts[s.i] == s.i:
|
||||||
if g_starts[s.i] == s.i:
|
|
||||||
accept_r = True
|
accept_r = True
|
||||||
r_label = 0
|
r_label = 0
|
||||||
accept_s = False
|
accept_s = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user