(name: str | pathlib.Path, **kwargs)
return spacy_lang
Load a spaCy ``Language`` — a shared vocabulary and language-specific data
    for tokenizing text, and (if available) model data and a processing pipeline
    containing a sequence of components for annotating a document — and cache results,
    for quick reloading as needed.

    Note that as of spaCy v3, for which pipeline aliases are no longer allowed,
    this function is just a convenient access point to underlying :func:`spacy.load()`.

    .. code-block:: pycon

        >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm")
        >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm", disable=("parser",))
        >>> textacy.load_spacy_lang("ar")
        ...
        OSError: [E050] Can't find model 'ar'. It doesn't seem to be a Python package or a valid path to a data directory.

    Args:
        name: Name or path to the spaCy language pipeline to load.
        **kwargs

    Note:
        Although spaCy's API specifies some kwargs as ``List[str]``, here we require
        ``Tuple[str, ...]`` equivalents. Language pipelines are stored in an LRU cache
        with unique identifiers generated from the hash of the function name and args —
        and lists aren't hashable.

    Returns:
        Loaded spaCy ``Language``.

    Raises:
        OSError

    See Also:
        https://spacy.io/api/top-level#spacy.load
Load a spaCy ``Language`` — a shared vocabulary and language-specific data
    for tokenizing text, and (if available) model data and a processing pipeline
    containing a sequence of components for annotating a document — and cache results,
    for quick reloading as needed.
Load a spaCy Language — a shared vocabulary and language - specific data for tokenizing text and ( if available ) model data and a processing pipeline containing a sequence of components for annotating a document — and cache results for quick reloading as needed .
def load_spacy_lang(name: str | pathlib.Path, **kwargs) -> Language:
    """
    Load a spaCy ``Language`` — a shared vocabulary and language-specific data
    for tokenizing text, and (if available) model data and a processing pipeline
    containing a sequence of components for annotating a document — and cache results,
    for quick reloading as needed.

    Note that as of spaCy v3, for which pipeline aliases are no longer allowed,
    this function is just a convenient access point to underlying :func:`spacy.load()`.

    .. code-block:: pycon

        >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm")
        >>> en_nlp = textacy.load_spacy_lang("en_core_web_sm", disable=("parser",))
        >>> textacy.load_spacy_lang("ar")
        ...
        OSError: [E050] Can't find model 'ar'. It doesn't seem to be a Python package or a valid path to a data directory.

    Args:
        name: Name or path to the spaCy language pipeline to load.
        **kwargs

    Note:
        Although spaCy's API specifies some kwargs as ``List[str]``, here we require
        ``Tuple[str, ...]`` equivalents. Language pipelines are stored in an LRU cache
        with unique identifiers generated from the hash of the function name and args —
        and lists aren't hashable.

    Returns:
        Loaded spaCy ``Language``.

    Raises:
        OSError

    See Also:
        https://spacy.io/api/top-level#spacy.load
    """
    spacy_lang = spacy.load(name, **kwargs)
    LOGGER.info("loaded '%s' spaCy language pipeline", name)
    return spacy_lang
def load_spacy_lang ( name : str | pathlib . Path , * * kwargs ) -> Language : spacy_lang = spacy . load ( name , * * kwargs ) LOGGER . info ( "loaded '%s' spaCy language pipeline" , name ) return spacy_lang