mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Fix bug in NER transition system, that sometimes left no valid moves
This commit is contained in:
parent
ab5aac5b2f
commit
44fbdc7260
|
@ -170,6 +170,9 @@ cdef class Begin:
|
|||
return False
|
||||
elif preset_ent_iob == 3 and st.B_(0).ent_type != label:
|
||||
return False
|
||||
# If the next word is B or O, we can't B now
|
||||
elif st.B_(1).ent_iob == 2 or st.B_(1).ent_iob == 3:
|
||||
return False
|
||||
# Don't allow entities to extend across sentence boundaries
|
||||
elif st.B_(1).sent_start:
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue
Block a user