7e7a2b27edd81786fe3f6e4439c1ff5effcc6233,snips_nlu/intent_parser/probabilistic_intent_parser.py,ProbabilisticIntentParser,fit,#ProbabilisticIntentParser#Any#Any#,44

Before Change


        if intents is None:
            intents = dataset[INTENTS].keys()

        self.language = Language.from_iso_code(dataset[LANGUAGE])
        self.intent_classifier = SnipsIntentClassifier(
            self.config.intent_classifier_config)
        self.intent_classifier.fit(dataset)
        if self.slot_fillers is None:
            self.slot_fillers = dict()
        for intent_name in intents:
            feature_signatures = crf_features(
                dataset, intent_name, self.language,
                self.config.crf_slot_filler_config)
            self.slot_fillers[intent_name] = CRFSlotFiller(
                features_signatures=feature_signatures,
                config=self.config.crf_slot_filler_config)
            self.slot_fillers[intent_name].fit(dataset, intent_name)
        return self

    def get_missing_intents(self, dataset, intents_to_fit):

After Change


        for intent_name in intents:
            // We need to copy the slot filler config as it may be mutated
            slot_filler_config = deepcopy(self.config.crf_slot_filler_config)
            self.slot_fillers[intent_name] = CRFSlotFiller(slot_filler_config)
            self.slot_fillers[intent_name].fit(dataset, intent_name)
        return self

    def get_missing_intents(self, dataset, intents_to_fit):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: snipsco/snips-nlu
Commit Name: 7e7a2b27edd81786fe3f6e4439c1ff5effcc6233
Time: 2018-01-18
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/probabilistic_intent_parser.py
Class Name: ProbabilisticIntentParser
Method Name: fit


Project Name: snipsco/snips-nlu
Commit Name: 7e7a2b27edd81786fe3f6e4439c1ff5effcc6233
Time: 2018-01-18
Author: adrien.ball@snips.net
File Name: snips_nlu/intent_parser/probabilistic_intent_parser.py
Class Name: ProbabilisticIntentParser
Method Name: get_fitted_slot_filler


Project Name: snipsco/snips-nlu
Commit Name: 64166241561ef4e968f4c2befdcefcd1de376292
Time: 2019-05-20
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_crf_slot_filler.py
Class Name: TestCRFSlotFiller
Method Name: test_should_get_builtin_slots


Project Name: snipsco/snips-nlu
Commit Name: 64166241561ef4e968f4c2befdcefcd1de376292
Time: 2019-05-20
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_crf_slot_filler.py
Class Name: TestCRFSlotFiller
Method Name: test_should_get_sub_builtin_slots