5d269f422294ed370c4f404f3a90dc1641f48b15,snips_nlu/entity_parser/custom_entity_parser.py,CustomEntityParser,_parse,#CustomEntityParser#Any#Any#,93

Before Change


        for entity in entities:
            start = entity[RES_MATCH_RANGE][START]
            end = entity[RES_MATCH_RANGE][END]
            entity[ENTITY_KIND] = entity.pop("entity_identifier")
            entity[RES_MATCH_RANGE][START] -= shifts[start]
            entity[RES_MATCH_RANGE][END] -= shifts[end - 1]
        return entities

After Change


            end = entity["range"]["end"]
            end -= shifts[end -1]
            entity_range = {START: start, END: end}
            ent = parsed_entity(
                entity_kind=entity["entity_identifier"],
                entity_value=entity["value"],
                entity_resolved_value=entity["resolved_value"],
                entity_range=entity_range
            )
            result.append(ent)
        return result

    def persist(self, path):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: snipsco/snips-nlu
Commit Name: 5d269f422294ed370c4f404f3a90dc1641f48b15
Time: 2019-01-08
Author: clement.doumouro@gmail.com
File Name: snips_nlu/entity_parser/custom_entity_parser.py
Class Name: CustomEntityParser
Method Name: _parse


Project Name: snipsco/snips-nlu
Commit Name: e4138565f9ab3a86ae655480c0ae7d79e7352b99
Time: 2017-02-24
Author: clement.doumouro@snips.ai
File Name: custom_intent_parser/built_in_intents.py
Class Name:
Method Name: get_built_in_intent_entities


Project Name: snipsco/snips-nlu
Commit Name: c1ba10f9e950fadde16a1c621d97a863d9366038
Time: 2017-02-24
Author: clement.doumouro@snips.ai
File Name: custom_intent_parser/entity_extractor/regex_entity_extractor.py
Class Name:
Method Name: match_to_result