f83dd115acb0d119fa466fad51b473a30749f684,snips_nlu/intent_parser/regex_intent_parser.py,RegexIntentParser,get_slots,#RegexIntentParser#Any#Any#,158

Before Change


            raise KeyError("Intent not found in RegexIntentParser: %s"
                           % intent)
        slots = []
        for regex in self.regexes_per_intent[intent]:
            match = regex.match(text)
            if match is None:
                continue
            for group_name in match.groupdict():
                slot_name = self.group_names_to_slot_names[group_name]
                entity = self.slot_names_to_entities[slot_name]
                rng = (match.start(group_name), match.end(group_name))
                parsed_slot = ParsedSlot(match_range=rng,
                                         value=match.group(group_name),
                                         entity=entity,

After Change


            raise KeyError("Intent not found in RegexIntentParser: %s"
                           % intent)
        if text not in self._cache:
            self._parse(text)
        res = self._cache[text]
        if intent is not None and res.parsed_intent is not None and \
                        res.parsed_intent.intent_name != intent:
            return []
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: snipsco/snips-nlu
Commit Name: f83dd115acb0d119fa466fad51b473a30749f684
Time: 2017-05-11
Author: clement.doumouro@snips.ai
File Name: snips_nlu/intent_parser/regex_intent_parser.py
Class Name: RegexIntentParser
Method Name: get_slots


Project Name: snipsco/snips-nlu
Commit Name: 43c0ad5bb6d6279bded4092115a59118c2e8a929
Time: 2018-01-18
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/deterministic_intent_parser.py
Class Name: DeterministicIntentParser
Method Name: get_slots


Project Name: AIRLab-POLIMI/mushroom
Commit Name: d641cd7cf8d44d76e34076ed6df3c04154976bf4
Time: 2017-10-03
Author: boris.ilpossente@hotmail.it
File Name: mushroom/algorithms/td.py
Class Name: TD
Method Name: fit


Project Name: snipsco/snips-nlu
Commit Name: f83dd115acb0d119fa466fad51b473a30749f684
Time: 2017-05-11
Author: clement.doumouro@snips.ai
File Name: snips_nlu/intent_parser/regex_intent_parser.py
Class Name: RegexIntentParser
Method Name: get_slots