def test_duckling_patching(): entities = [[{ "start": 37, "end": 56, "value": "near Alexanderplatz", "entity": "location", "extractor": "ner_crf" }, { "start": 57, "end": 64, "value": "tonight", "entity": "Time", "extractor": "ner_duckling" }]] patched = [[{ "start": 37, "end": 56, "value": "near Alexanderplatz", "entity": "location", "extractor": "ner_crf" }, { "start": 57, "end": 64, "value": "tonight", "entity": "Time", "extractor": "ner_duckling (Time)" }]] assert patch_duckling_entities(entities) == patched
def test_duckling_patching(): entities = [[ { "start": 37, "end": 56, "value": "near Alexanderplatz", "entity": "location", "extractor": "ner_crf" }, { "start": 57, "end": 64, "value": "tonight", "entity": "Time", "extractor": "ner_duckling" } ]] patched = [[ { "start": 37, "end": 56, "value": "near Alexanderplatz", "entity": "location", "extractor": "ner_crf" }, { "start": 57, "end": 64, "value": "tonight", "entity": "Time", "extractor": "ner_duckling (Time)" } ]] assert patch_duckling_entities(entities) == patched