e4f8240684e26ac16adc2de28bf79d4433c9788e,textacy/cache.py,,load_spacy_lang,#Any#Any#,75

Before Change


    
    if disable is None:
        disable = []
    LOGGER.debug("Loading "%s" spaCy pipeline", name)
    return spacy.load(name, disable=disable)


@cached(LRU_CACHE, key=functools.partial(hashkey, "hyphenator"))

After Change


    if disable is None:
        disable = []
    // load a full spacy lang processing pipeline
    try:
        spacy_lang = spacy.load(name, disable=disable)
        LOGGER.info("loaded "%s" spaCy language pipeline", name)
        return spacy_lang
    except (OSError, IOError) as e:
        // fall back to a blank spacy lang
        if isinstance(name, compat.unicode_) and len(name) == 2:
            spacy_lang = spacy.blank(name)
            LOGGER.warning("loaded "%s" spaCy language blank", name)
            return spacy_lang
        raise e


@cached(LRU_CACHE, key=functools.partial(hashkey, "hyphenator"))
def load_hyphenator(lang):
    
    Load an object that hyphenates words at valid points, as used in LaTex typesetting.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chartbeat-labs/textacy
Commit Name: e4f8240684e26ac16adc2de28bf79d4433c9788e
Time: 2019-05-18
Author: burtdewilde@gmail.com
File Name: textacy/cache.py
Class Name:
Method Name: load_spacy_lang


Project Name: home-assistant/home-assistant
Commit Name: e593383b4d7fb1c8f83f2f1d522abde0f605f450
Time: 2019-01-26
Author: amelchio@nogoto.net
File Name: homeassistant/components/recorder/purge.py
Class Name:
Method Name: purge_old_data


Project Name: quiltdata/quilt
Commit Name: 2b04b6256e7e98a3338a47b067344981e44a0140
Time: 2020-09-16
Author: akarve@users.noreply.github.com
File Name: lambdas/es/indexer/index.py
Class Name:
Method Name: handler