mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Remove unused error
This commit is contained in:
parent
1c63f02f99
commit
5c13e0cf1b
|
@ -692,9 +692,6 @@ class Errors:
|
||||||
"options: {modes}")
|
"options: {modes}")
|
||||||
E1012 = ("Entity spans and blocked/missing/outside spans should be "
|
E1012 = ("Entity spans and blocked/missing/outside spans should be "
|
||||||
"provided to doc.set_ents as lists of `Span` objects.")
|
"provided to doc.set_ents as lists of `Span` objects.")
|
||||||
E1013 = ("Unable to set entity for span with empty label. Entity spans are "
|
|
||||||
"required to have a label. To set entity information as missing "
|
|
||||||
"or blocked, use the keyword arguments with doc.set_ents.")
|
|
||||||
|
|
||||||
|
|
||||||
@add_codes
|
@add_codes
|
||||||
|
|
|
@ -725,8 +725,6 @@ cdef class Doc:
|
||||||
# Set all specified entity information
|
# Set all specified entity information
|
||||||
for span in entities:
|
for span in entities:
|
||||||
for i in range(span.start, span.end):
|
for i in range(span.start, span.end):
|
||||||
if not span.label:
|
|
||||||
raise ValueError(Errors.E1013)
|
|
||||||
if i == span.start:
|
if i == span.start:
|
||||||
self.c[i].ent_iob = 3
|
self.c[i].ent_iob = 3
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user