Home / Function/ _make_spacy_pipeline_for_splitting() — langchain Function Reference

_make_spacy_pipeline_for_splitting() — langchain Function Reference

Architecture documentation for the _make_spacy_pipeline_for_splitting() function in spacy.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  ece31838_968b_0c38_6917_d7e89aa19470["_make_spacy_pipeline_for_splitting()"]
  6511588c_fdc6_97a2_3753_2c61ff504a39["spacy.py"]
  ece31838_968b_0c38_6917_d7e89aa19470 -->|defined in| 6511588c_fdc6_97a2_3753_2c61ff504a39
  e0797988_1925_cf16_1939_4f7e0b8d7f57["__init__()"]
  e0797988_1925_cf16_1939_4f7e0b8d7f57 -->|calls| ece31838_968b_0c38_6917_d7e89aa19470
  ece31838_968b_0c38_6917_d7e89aa19470["_make_spacy_pipeline_for_splitting()"]
  ece31838_968b_0c38_6917_d7e89aa19470 -->|calls| ece31838_968b_0c38_6917_d7e89aa19470
  ece31838_968b_0c38_6917_d7e89aa19470["_make_spacy_pipeline_for_splitting()"]
  ece31838_968b_0c38_6917_d7e89aa19470 -->|calls| ece31838_968b_0c38_6917_d7e89aa19470
  style ece31838_968b_0c38_6917_d7e89aa19470 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/text-splitters/langchain_text_splitters/spacy.py lines 61–73

def _make_spacy_pipeline_for_splitting(
    pipeline: str, *, max_length: int = 1_000_000
) -> Language:
    if not _HAS_SPACY:
        msg = "Spacy is not installed, please install it with `pip install spacy`."
        raise ImportError(msg)
    if pipeline == "sentencizer":
        sentencizer: Language = English()
        sentencizer.add_pipe("sentencizer")
    else:
        sentencizer = spacy.load(pipeline, exclude=["ner", "tagger"])
        sentencizer.max_length = max_length
    return sentencizer

Subdomains

Frequently Asked Questions

What does _make_spacy_pipeline_for_splitting() do?
_make_spacy_pipeline_for_splitting() is a function in the langchain codebase, defined in libs/text-splitters/langchain_text_splitters/spacy.py.
Where is _make_spacy_pipeline_for_splitting() defined?
_make_spacy_pipeline_for_splitting() is defined in libs/text-splitters/langchain_text_splitters/spacy.py at line 61.
What does _make_spacy_pipeline_for_splitting() call?
_make_spacy_pipeline_for_splitting() calls 1 function(s): _make_spacy_pipeline_for_splitting.
What calls _make_spacy_pipeline_for_splitting()?
_make_spacy_pipeline_for_splitting() is called by 2 function(s): __init__, _make_spacy_pipeline_for_splitting.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free