75df2742635b09f97e8d7ec9396750aa17046567,snips_nlu/intent_parser/builtin_intent_parser.py,BuiltinIntentParser,_parse,#BuiltinIntentParser#Any#,33

Before Change


        return self._cache[text]

    def _parse(self, text):
        if len(self.builtin_intents) == 0:
            return result(text)

        most_likely_intent = self.get_intent(text)
        if most_likely_intent is None:
            return result(text)

After Change


            return {"text": text, "intent": None, "entities": []}

        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
Italian Trulli
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: snipsco/snips-nlu
Commit Name: ab1b67c1e958c9a642f57095f3499a893ba0a5b2
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: snipsco/snips-nlu
Commit Name: ab1b67c1e958c9a642f57095f3499a893ba0a5b2
Time: 2017-03-24
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/builtin_intent_parser.py
Class Name: BuiltinIntentParser
Method Name: parse