9cecc52e1fbf8b281d88244f6c43d2b76e374993,snips_nlu/nlu_engine/nlu_engine.py,SnipsNLUEngine,parse,#SnipsNLUEngine#Any#Any#,34

Before Change


        likely intent and slots.
        
        if not self.fitted:
            raise AssertionError("NLU engine must be fitted before calling "
                                 "`parse`")
        language = Language.from_iso_code(
            self.dataset_metadata["language_code"])
        return parse(text, self.dataset_metadata["entities"], language,
                     self.intent_parsers, intent)

After Change


        entities = self._dataset_metadata["entities"]

        for parser in self.intent_parsers:
            res = parser.parse(text, intents)
            if is_empty(res):
                continue
            slots = res[RES_SLOTS]
            scope = [BuiltInEntity.from_label(s[RES_ENTITY]) for s in slots
                     if is_builtin_entity(s[RES_ENTITY])]
            resolved_slots = resolve_slots(text, slots, entities, language,
                                           scope)
            return parsing_result(text, intent=res[RES_INTENT],
                                  slots=resolved_slots)
        return empty_result(text)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: snipsco/snips-nlu
Commit Name: 9cecc52e1fbf8b281d88244f6c43d2b76e374993
Time: 2018-02-07
Author: adrien.ball@snips.net
File Name: snips_nlu/nlu_engine/nlu_engine.py
Class Name: SnipsNLUEngine
Method Name: parse


Project Name: kmike/pymorphy2
Commit Name: b64003b2edeaa36b9dc85e82cc8a4ba0108098c9
Time: 2015-01-17
Author: kmike84@gmail.com
File Name: pymorphy2/units/base.py
Class Name: BaseAnalyzerUnit
Method Name: tag


Project Name: pantsbuild/pants
Commit Name: b2fbf435a7158a02c8199015e0c8a8a794c02f56
Time: 2018-10-03
Author: benjyw@gmail.com
File Name: src/python/pants/auth/basic_auth.py
Class Name: BasicAuth
Method Name: authenticate