75df2742635b09f97e8d7ec9396750aa17046567,snips_nlu/intent_parser/builtin_intent_parser.py,BuiltinIntentParser,_parse,#BuiltinIntentParser#Any#,33
Before Change
return result(text)
most_likely_intent = self.get_intent(text)
if most_likely_intent is None:
return result(text)
entities = get_built_in_intent_entities(
text, BuiltInIntent[most_likely_intent["intent"]])
return result(text, most_likely_intent, entities)
After Change
intent = self.get_intent(text)
entities = self.get_entities(text, intent=intent.get("name"))
return {"text": text, "intent": intent, "entities": entities}
def get_intent(self, text):
if not self.intents:
return None
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: snipsco/snips-nlu
Commit Name: 75df2742635b09f97e8d7ec9396750aa17046567
Time: 2017-03-24
Author: tristan.deleu@gmail.com
File Name: snips_nlu/intent_parser/builtin_intent_parser.py
Class Name: BuiltinIntentParser
Method Name: _parse
Project Name: keras-team/keras
Commit Name: 00135a70697dc9b4611971e5833e2d84501c3da7
Time: 2021-03-23
Author: scottzhu@google.com
File Name: keras/engine/training.py
Class Name: Model
Method Name: train_step
Project Name: keras-team/keras
Commit Name: 00135a70697dc9b4611971e5833e2d84501c3da7
Time: 2021-03-23
Author: scottzhu@google.com
File Name: keras/engine/training.py
Class Name: Model
Method Name: test_step