From 0ec4dc5c29578f9857004b0c747e10529616b6cf Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 3 Apr 2023 11:38:56 +0200 Subject: [PATCH] Remove redundant strings.add for Doc.char_span (#12429) --- spacy/tokens/doc.pyx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/spacy/tokens/doc.pyx b/spacy/tokens/doc.pyx index 7dfe0ca9f..3bc404dd0 100644 --- a/spacy/tokens/doc.pyx +++ b/spacy/tokens/doc.pyx @@ -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(