@pytest.mark.parametrize('text, entity, expected_entity', [('The first one please.', {'extractor': 'DucklingEntityExtractor', 'entity': 'ordinal', 'confidence': 0.87, 'start': 4, 'end': 9, 'value': 1}, {'text': 'The first one please.', 'entity': 'ordinal', 'start': 4, 'end': 9, 'value': '1'}), ('The first one please.', {'extractor': 'CRFEntityExtractor', 'entity': 'ordinal', 'confidence': 0.87, 'start': 4, 'end': 9, 'value': '1'}, {'text': 'The first one please.', 'entity': 'ordinal', 'start': 4, 'end': 9, 'value': '1'}), ('Italian food', {'extractor': 'DIETClassifier', 'entity': 'cuisine', 'confidence': 0.99, 'start': 0, 'end': 7, 'value': 'Italian'}, {'text': 'Italian food', 'entity': 'cuisine', 'start': 0, 'end': 7, 'value': 'Italian'})])
def test_event_has_proper_implementation(text: Text, entity: Dict[(Text, Any)], expected_entity: Dict[(Text, Any)]):
    actual_entities = _clean_entity_results(text, [entity])
    assert (actual_entities[0] == expected_entity)
@pytest.mark.parametrize('text, entity, expected_entity', [('The first one please.', {'extractor': 'DucklingEntityExtractor', 'entity': 'ordinal', 'confidence': 0.87, 'start': 4, 'end': 9, 'value': 1}, {'text': 'The first one please.', 'entity': 'ordinal', 'start': 4, 'end': 9, 'value': '1'}), ('The first one please.', {'extractor': 'CRFEntityExtractor', 'entity': 'ordinal', 'confidence': 0.87, 'start': 4, 'end': 9, 'value': '1'}, {'text': 'The first one please.', 'entity': 'ordinal', 'start': 4, 'end': 9, 'value': '1'}), ('Italian food', {'extractor': 'DIETClassifier', 'entity': 'cuisine', 'confidence': 0.99, 'start': 0, 'end': 7, 'value': 'Italian'}, {'text': 'Italian food', 'entity': 'cuisine', 'start': 0, 'end': 7, 'value': 'Italian'})])
def test_event_has_proper_implementation(text: Text, entity: Dict[(Text, Any)], expected_entity: Dict[(Text, Any)]):
    actual_entities = _clean_entity_results(text, [entity])
    assert (actual_entities[0] == expected_entity)