ComfyUI > Nodes > comfyui_LLM_Polymath > Split Texts by Specified Delimiter

ComfyUI Node: Split Texts by Specified Delimiter

Class Name

polymath_TextSplitter

Category
Polymath/helper
Author
lum3on (Account age: 105days)
Extension
comfyui_LLM_Polymath
Latest Updated
2025-05-18
Github Stars
0.06K

How to Install comfyui_LLM_Polymath

Install this extension via the ComfyUI Manager by searching for comfyui_LLM_Polymath
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui_LLM_Polymath in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Split Texts by Specified Delimiter Description

Facilitates text segmentation based on delimiter for efficient processing and analysis.

Split Texts by Specified Delimiter:

The polymath_TextSplitter node is designed to facilitate the division of a given text into smaller segments based on a specified delimiter. This node is particularly useful for processing large blocks of text by breaking them down into manageable parts, which can then be individually analyzed or manipulated. The primary function of this node is to split text strings, allowing for more efficient text handling and analysis. It also offers the flexibility to ignore certain parts of the text before a specified character, enhancing its utility in various text processing scenarios. This node is an essential tool for AI artists and developers who need to parse and process text data efficiently.

Split Texts by Specified Delimiter Input Parameters:

input_string

The input_string parameter is the main text input that you want to split. It is a required field and must be provided as a string. This parameter supports multiline text, allowing you to input large blocks of text that need to be divided into smaller parts. The effectiveness of the text splitting process largely depends on the content of this input.

delimiter

The delimiter parameter specifies the character or string that will be used to split the input_string. By default, this is set to a newline character (\n), but you can customize it to any string that suits your needs. This parameter is crucial as it determines how the text will be divided. If the delimiter is not found in the text, the entire input will be treated as a single segment.

ignore_before_equals

The ignore_before_equals parameter is a boolean option that, when set to true, instructs the node to ignore any text before the first equals sign (=) in each segment. This is particularly useful when dealing with key-value pairs or similar structures where the text before the equals sign is not needed. The default value is false, meaning the entire segment will be retained unless specified otherwise.

Split Texts by Specified Delimiter Output Parameters:

splitted_texts

The splitted_texts output parameter is a list of strings, each representing a segment of the original input_string that has been divided based on the specified delimiter. This output is crucial for further processing or analysis, as it provides the individual text segments that can be independently manipulated or examined. The list format allows for easy iteration and access to each segment.

Split Texts by Specified Delimiter Usage Tips:

  • To effectively split a text into paragraphs, use the default newline character (\n) as the delimiter. This is particularly useful for processing documents or articles.
  • If you are working with data in a key-value format, set ignore_before_equals to true to automatically discard the keys and focus on the values.
  • Experiment with different delimiters to see how they affect the segmentation of your text, especially when dealing with complex data structures.

Split Texts by Specified Delimiter Common Errors and Solutions:

Delimiter not found

  • Explanation: This error occurs when the specified delimiter is not present in the input_string, resulting in the entire text being returned as a single segment.
  • Solution: Ensure that the delimiter you specify is present in the text. If necessary, adjust the delimiter to match the structure of your text.

Empty input_string

  • Explanation: An empty input_string will result in an empty output list, as there is no text to split.
  • Solution: Verify that the input_string is not empty before processing. Provide a valid text input to ensure meaningful output.

Invalid delimiter

  • Explanation: Using a non-string value as a delimiter can cause unexpected behavior or errors.
  • Solution: Always use a string value for the delimiter, even if it is a single character. Double-check the delimiter input to ensure it is correctly formatted.

Split Texts by Specified Delimiter Related Nodes

Go back to the extension to check out more related nodes.
comfyui_LLM_Polymath
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.