532993ef960a73631d29c43a5c8d2a8e42d7df92,snips_nlu/resources.py,,load_resources,#Any#,232

Before Change


        Language resources must be loaded before fitting or parsing
    
    if language in _RESOURCES:
        return
    _RESOURCES[language] = _load_resources(language)


def resource_exists(language, resource_name):

After Change


        Language resources must be loaded before fitting or parsing
    
    clear_resources()
    languages = os.listdir(resources_dir)
    all_supported_languages = get_all_languages()
    for language in languages:
        if language not in all_supported_languages:
            raise ValueError("Unknown language: "%s"" % language)
        _RESOURCES[language] = _load_resources(resources_dir, language)


def resource_exists(language, resource_name):
    Tell if the resource specified by the resource_name exist

        Args:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: snipsco/snips-nlu
Commit Name: 532993ef960a73631d29c43a5c8d2a8e42d7df92
Time: 2018-06-13
Author: adrien.ball@snips.net
File Name: snips_nlu/resources.py
Class Name:
Method Name: load_resources


Project Name: bokeh/bokeh
Commit Name: 29db516a79944c88078cc31bad09b20ffecdb4f9
Time: 2018-04-06
Author: mattpap@gmail.com
File Name: tests/examples/collect_examples.py
Class Name:
Method Name: add_examples


Project Name: facebook/FAI-PEP
Commit Name: e8757c2d8378fbe7ae0a607bd8a95c802f4cd527
Time: 2018-08-29
Author: 34827865+llyfacebook@users.noreply.github.com
File Name: benchmarking/repo_driver.py
Class Name: ExecutablesBuilder
Method Name: _buildProgram