def mock_ner_span(text, tag, start, end): span = Span([]) span.tag = tag span.start_pos = start span.end_pos = end span.tokens = [Token(text[start:end])] return span
def mock_ner_span(text, tag, start, end): span = Span([]).set_label("class", tag) span.start_pos = start span.end_pos = end span.tokens = [Token(text[start:end])] return span
def mock_ner_span(tag, start, end): span = Span([]) span.tag = tag span.start_pos = start span.end_pos = end return span