f83dd115acb0d119fa466fad51b473a30749f684,snips_nlu/intent_parser/regex_intent_parser.py,RegexIntentParser,get_intent,#RegexIntentParser#Any#,147
Before Change
for intent, regexes in self.regexes_per_intent.iteritems():
for regex in regexes:
if regex.match(text) is not None:
return IntentClassificationResult(intent_name=intent,
probability=1.0)
return None
def get_slots(self, text, intent=None):
if not self.fitted:
After Change
if not self.fitted:
raise AssertionError("RegexIntentParser must be fitted before "
"calling `get_entities`")
if text not in self._cache:
self._parse(text)
return self._cache[text].parsed_intent
def get_slots(self, text, intent=None):
if not self.fitted:
In pattern: SUPERPATTERN
Frequency: 4
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_intent
Project Name: snipsco/snips-nlu
Commit Name: 4fb3562f2b9d70e91264a3917623f5cf226af50c
Time: 2017-03-24
Author: adrien.ball@snips.net
File Name: snips_nlu/nlu_engine/nlu_engine.py
Class Name: SnipsNLUEngine
Method Name: parse
Project Name: pantsbuild/pants
Commit Name: 1e3f7071cf4095abfface461164703106563c459
Time: 2016-02-22
Author: stuhood@gmail.com
File Name: src/python/pants/engine/exp/mapper.py
Class Name: AddressMapper
Method Name: family
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