mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
* Ensure entity recognizer doesn't over-write preset types
This commit is contained in:
parent
cd7d1682cd
commit
59c3bf60a6
|
@ -300,6 +300,8 @@ cdef class Unit:
|
|||
return False
|
||||
elif preset_ent_iob == 1:
|
||||
return False
|
||||
elif preset_ent_iob == 3 and st.B_(0).ent_type != label:
|
||||
return False
|
||||
elif st.B_(1).ent_iob == 1:
|
||||
return False
|
||||
return label != 0 and not st.entity_is_open()
|
||||
|
|
Loading…
Reference in New Issue
Block a user