673eb1f351468f4d385d9cc2156a367a3c911bde,snips_nlu/intent_parser/regex_intent_parser.py,RegexIntentParser,get_intent,#RegexIntentParser#Any#,145

Before Change



        top_intent, top_proba = max(intents_probas.items(),
                                    key=operator.itemgetter(1))
        return IntentClassificationResult(intent_name=top_intent,
                                          probability=top_proba)

    def get_slots(self, text, intent=None):
        if not self.fitted:
            raise AssertionError("RegexIntentParser must be fitted before "

After Change


                                 "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:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: snipsco/snips-nlu
Commit Name: 673eb1f351468f4d385d9cc2156a367a3c911bde
Time: 2017-05-03
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/regex_intent_parser.py
Class Name: RegexIntentParser
Method Name: get_intent


Project Name: floydhub/dockerfiles
Commit Name: 5ac177662e054b9b8f4ad95fc9053561cc69a6a8
Time: 2017-06-20
Author: dave2008713@gmail.com
File Name: floydker/src/floydker/utils.py
Class Name:
Method Name: gen_target_env_from_tag


Project Name: RaRe-Technologies/gensim
Commit Name: 11eb5df876a007566dfc98c0132ef5ef04675959
Time: 2019-07-07
Author: witiko@gmail.com
File Name: gensim/models/tfidfmodel.py
Class Name:
Method Name: resolve_weights


Project Name: andresriancho/w3af
Commit Name: 6c808fa0af3f66be4cee3204c0a45a7075eab625
Time: 2018-11-09
Author: aronmolnar@itsecure.at
File Name: w3af/core/data/parsers/doc/url.py
Class Name: URL
Method Name: is_valid_domain