Esempio n. 1
0
def test_extract_entities():
    text = u"Victoria is the grandma of Monica."
    fee = FlairEntityExtractor().en_lang()
    entities, per_entities = fee.extract_entities(text)

    assert entities == ['victoria', 'monica']
    assert per_entities == ['victoria', 'monica']
Esempio n. 2
0
def test_extract_entities_2():
    utterance = 'Tom Cruise and Nicole Kidman.'
    fee = FlairEntityExtractor().en_lang()
    entities, per_entities = fee.extract_entities(utterance)

    assert entities == ['tom_cruise', 'nicole_kidman']
    assert per_entities == ['tom_cruise', 'nicole_kidman']