split_text() — langchain Function Reference
Architecture documentation for the split_text() function in html.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d["split_text()"] 86dc20d4_404a_b608_01da_8dea923ef2c9["HTMLHeaderTextSplitter"] 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d -->|defined in| 86dc20d4_404a_b608_01da_8dea923ef2c9 982f8e7f_63e2_a8f4_7f7f_3def7fb3d84b["split_text_from_url()"] 982f8e7f_63e2_a8f4_7f7f_3def7fb3d84b -->|calls| 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d cdce0dab_74f2_fff9_b284_195643913ed5["split_text()"] cdce0dab_74f2_fff9_b284_195643913ed5 -->|calls| 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d 127c75d0_d814_d16e_a93c_928f021add9c["split_text()"] 127c75d0_d814_d16e_a93c_928f021add9c -->|calls| 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d fb63895c_3000_9932_3530_3357c6736f4f["create_documents()"] fb63895c_3000_9932_3530_3357c6736f4f -->|calls| 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d e9c69e37_40ed_2949_d6dc_f6a7770ff7b8["transform_documents()"] e9c69e37_40ed_2949_d6dc_f6a7770ff7b8 -->|calls| 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d cf1e77cb_9fca_ca93_1428_c967d5cb0c97["split_text_from_file()"] 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d -->|calls| cf1e77cb_9fca_ca93_1428_c967d5cb0c97 cdce0dab_74f2_fff9_b284_195643913ed5["split_text()"] 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d -->|calls| cdce0dab_74f2_fff9_b284_195643913ed5 style 3a8f906a_02bf_a0ff_6dbb_2ffbc48f937d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/text-splitters/langchain_text_splitters/html.py lines 175–187
def split_text(self, text: str) -> list[Document]:
"""Split the given text into a list of `Document` objects.
Args:
text: The HTML text to split.
Returns:
A list of split `Document` objects.
Each `Document` contains `page_content` holding the extracted text and
`metadata` that maps the header hierarchy to their corresponding titles.
"""
return self.split_text_from_file(StringIO(text))
Domain
Subdomains
Source
Frequently Asked Questions
What does split_text() do?
split_text() is a function in the langchain codebase, defined in libs/text-splitters/langchain_text_splitters/html.py.
Where is split_text() defined?
split_text() is defined in libs/text-splitters/langchain_text_splitters/html.py at line 175.
What does split_text() call?
split_text() calls 2 function(s): split_text, split_text_from_file.
What calls split_text()?
split_text() is called by 5 function(s): create_documents, split_text, split_text, split_text_from_url, transform_documents.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free