532993ef960a73631d29c43a5c8d2a8e42d7df92,snips_nlu/resources.py,,_load_stop_words,#Any#,89

Before Change



def _load_stop_words(language):
    stop_words = set()
    if STOP_WORDS in RESOURCE_INDEX[language]:
        stop_words_file_path = os.path.join(
            get_resources_path(language),
            RESOURCE_INDEX[language][STOP_WORDS])
        with io.open(stop_words_file_path, encoding="utf8") as f:
            lines = (normalize(l) for l in f)
            stop_words = set(l for l in lines if l)
    return stop_words


def get_stop_words(language):

After Change




def _load_stop_words(stop_words_path):
    if not os.path.exists(stop_words_path):
        return None
    with io.open(stop_words_path, encoding="utf8") as f:
        lines = (normalize(l) for l in f)
    stop_words = set(l for l in lines if l)
    return stop_words
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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_stop_words


Project Name: ultralytics/yolov3
Commit Name: 0bc1db58d82c2482bfac1e32a3a43cfd5a533da2
Time: 2021-01-10
Author: glenn.jocher@ultralytics.com
File Name: utils/google_utils.py
Class Name:
Method Name: attempt_download


Project Name: IndicoDataSolutions/Enso
Commit Name: 164b3ff1e18f36371eb152ea4ab973eb2abeed46
Time: 2017-12-11
Author: madison@indico.io
File Name: enso/visualize/__init__.py
Class Name: Visualization
Method Name: _resolve_results_id