from spacy.munge.read_ner import _get_text, _get_tag
def test_get_text():
assert _get_text('asbestos') == 'asbestos'
assert _get_text('Lorillard') == 'Lorillard'
assert _get_text('more') == 'more'
assert _get_text('ago') == 'ago'
def test_get_tag():
assert _get_tag('asbestos', None) == ('O', None)
assert _get_tag('asbestos', 'PER') == ('I-PER', 'PER')
assert _get_tag('Lorillard', None) == ('U-ORG', None)
assert _get_tag('more', None) == ('B-DATE', 'DATE')
assert _get_tag('ago', 'DATE') == ('L-DATE', None)