mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-15 06:09:01 +03:00
Remove redundant strings.add for Doc.char_span (#12429)
This commit is contained in:
parent
a5406a6c45
commit
0ec4dc5c29
|
@ -544,10 +544,6 @@ cdef class Doc:
|
|||
|
||||
DOCS: https://spacy.io/api/doc#char_span
|
||||
"""
|
||||
if not isinstance(label, int):
|
||||
label = self.vocab.strings.add(label)
|
||||
if not isinstance(kb_id, int):
|
||||
kb_id = self.vocab.strings.add(kb_id)
|
||||
alignment_modes = ("strict", "contract", "expand")
|
||||
if alignment_mode not in alignment_modes:
|
||||
raise ValueError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user