f83dd115acb0d119fa466fad51b473a30749f684,snips_nlu/intent_parser/regex_intent_parser.py,RegexIntentParser,get_intent,#RegexIntentParser#Any#,147
Before Change
if not self.fitted:
raise AssertionError("RegexIntentParser must be fitted before "
"calling `get_entities`")
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
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: 3
Non-data size: 4
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: 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: mittagessen/kraken
Commit Name: 4ff1e671f251f69ee24f75257abdd0841f2dbdfc
Time: 2018-05-24
Author: mittagessen@l.unchti.me
File Name: kraken/lib/vgsl.py
Class Name: TorchVGSLModel
Method Name: __init__