mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-13 18:56:36 +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
|
return False
|
||||||
elif preset_ent_iob == 1:
|
elif preset_ent_iob == 1:
|
||||||
return False
|
return False
|
||||||
|
elif preset_ent_iob == 3 and st.B_(0).ent_type != label:
|
||||||
|
return False
|
||||||
elif st.B_(1).ent_iob == 1:
|
elif st.B_(1).ent_iob == 1:
|
||||||
return False
|
return False
|
||||||
return label != 0 and not st.entity_is_open()
|
return label != 0 and not st.entity_is_open()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user