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

Before Change


        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,
                                         slot_name=slot_name)
                slots.append(parsed_slot)

After Change


        res = self._cache[text]
        if intent is not None and res.parsed_intent is not None and \
                        res.parsed_intent.intent_name != intent:
            return []
        return res.parsed_slots

    def _parse(self, text):
        if not self.fitted:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: nipunsadvilkar/pySBD
Commit Name: 0e364f4b0f70679ca984c0ba5629c569135804a4
Time: 2020-07-26
Author: nipunsadvilkar@gmail.com
File Name: pysbd/segmenter.py
Class Name: Segmenter
Method Name: sentences_with_char_spans


Project Name: snipsco/snips-nlu
Commit Name: d264e82050700d9aaed31c11dbd65f9dbd03e4d9
Time: 2017-04-25
Author: adrien.ball@snips.net
File Name: snips_nlu/tokenization.py
Class Name:
Method Name: tokenize