f83dd115acb0d119fa466fad51b473a30749f684,snips_nlu/intent_parser/regex_intent_parser.py,RegexIntentParser,get_slots,#RegexIntentParser#Any#Any#,158
Before Change
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)
return deduplicate_overlapping_slots(slots)
def to_dict(self):
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:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: b4ea9436bf58a3ad8326e2b617416e045be8335b
Time: 2017-05-02
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/crf_intent_parser.py
Class Name: CRFIntentParser
Method Name: get_slots
Project Name: snipsco/snips-nlu
Commit Name: 25cdc4fb25f23b0c6f407c018e0bc4ec368cebf7
Time: 2018-01-18
Author: adrien.ball@snips.net
File Name: snips_nlu/tests/test_result.py
Class Name: TestResult
Method Name: test_should_serialize_results