Home / Function/ test_spacy_text_splitter() — langchain Function Reference

test_spacy_text_splitter() — langchain Function Reference

Architecture documentation for the test_spacy_text_splitter() function in test_nlp_text_splitters.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  06c42954_c8fe_521f_aab8_02c1a7ec097f["test_spacy_text_splitter()"]
  a159cbba_51f0_5d34_8696_299b594bb0fe["test_nlp_text_splitters.py"]
  06c42954_c8fe_521f_aab8_02c1a7ec097f -->|defined in| a159cbba_51f0_5d34_8696_299b594bb0fe
  style 06c42954_c8fe_521f_aab8_02c1a7ec097f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/text-splitters/tests/integration_tests/test_nlp_text_splitters.py lines 68–75

def test_spacy_text_splitter(pipeline: str) -> None:
    """Test splitting by sentence using Spacy."""
    text = "This is sentence one. And this is sentence two."
    separator = "|||"
    splitter = SpacyTextSplitter(separator=separator, pipeline=pipeline)
    output = splitter.split_text(text)
    expected_output = [f"This is sentence one.{separator}And this is sentence two."]
    assert output == expected_output

Domain

Subdomains

Frequently Asked Questions

What does test_spacy_text_splitter() do?
test_spacy_text_splitter() is a function in the langchain codebase, defined in libs/text-splitters/tests/integration_tests/test_nlp_text_splitters.py.
Where is test_spacy_text_splitter() defined?
test_spacy_text_splitter() is defined in libs/text-splitters/tests/integration_tests/test_nlp_text_splitters.py at line 68.

Analyze Your Own Codebase

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

Try Supermodel Free