ab1b67c1e958c9a642f57095f3499a893ba0a5b2,snips_nlu/nlu_engine/nlu_engine.py,SnipsNLUEngine,load,#Any#Any#,72

Before Change


        builtin_intents_directory = os.path.join(directory_path,
                                                 "builtin_intents")
        if len(os.listdir(custom_intents_directory)) > 0:
            custom_intent_parser = RegexIntentParser.load(
                custom_intents_directory)
        else:
            custom_intent_parser = None
        if len(os.listdir(builtin_intents_directory)) > 0:
            builtin_intent_parser = BuiltinIntentParser(

After Change


            RegexIntentParser.load(os.path.join(custom_intents_dir, path)) for
            path in os.listdir(custom_intents_dir)]
        configs_dir = os.path.join(builtin_intents_dir, "configurations")
        gazetteers_dir = os.path.join(builtin_intents_dir, "gazetteers")
        builtin_parsers = [BuiltinIntentParser(config_path, gazetteers_dir) for
                           config_path in os.listdir(configs_dir)]
        return SnipsNLUEngine(custom_parsers + builtin_parsers)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


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: load


Project Name: erikbern/ann-benchmarks
Commit Name: cb3e1cd4ea31161adc4b62c88c5974809bfd9f9f
Time: 2017-11-12
Author: mail@erikbern.com
File Name: plot.py
Class Name:
Method Name:


Project Name: openai/pixel-cnn
Commit Name: 5c8a402bea587eb9720a0dcf21175c59789c35c9
Time: 2016-11-02
Author: andrej.karpathy@gmail.com
File Name: data/imagenet_data.py
Class Name: DataLoader
Method Name: __init__