ComfyUI > Nodes > GeminiOllama ComfyUI Extension > TextSplitByDelimiter

ComfyUI Node: TextSplitByDelimiter

Class Name

TextSplitByDelimiter

Category
AI API
Author
al-swaiti (Account age: 3544days)
Extension
GeminiOllama ComfyUI Extension
Latest Updated
2025-02-05
Github Stars
1.43K

How to Install GeminiOllama ComfyUI Extension

Install this extension via the ComfyUI Manager by searching for GeminiOllama ComfyUI Extension
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter GeminiOllama ComfyUI Extension 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

TextSplitByDelimiter Description

Efficiently splits text into segments based on delimiter for organized text processing.

TextSplitByDelimiter:

The TextSplitByDelimiter node is designed to efficiently split a given text into smaller segments based on a specified delimiter. This node is particularly useful when you need to process or analyze text data in chunks, allowing for more manageable and organized handling of large text bodies. By providing the ability to specify a starting index, skip intervals, and a maximum count of segments, this node offers flexibility in how the text is divided, making it adaptable to various text processing needs. Whether you're preparing text for further analysis or simply organizing it for readability, the TextSplitByDelimiter node provides a straightforward and effective solution.

TextSplitByDelimiter Input Parameters:

text

The text parameter is the main body of text that you want to split. It serves as the input data that will be divided into segments based on the specified delimiter. The content and length of this text will directly impact the number and size of the resulting segments.

delimiter

The delimiter parameter specifies the character or sequence of characters that will be used to split the text. If left empty, the entire text will be treated as a single segment. This parameter is crucial as it defines the boundaries between segments, and it can be customized to suit different text structures, such as commas, spaces, or custom strings.

start_index

The start_index parameter determines the position in the text from which the splitting process will begin. This allows you to skip over initial segments that may not be relevant to your analysis or processing needs. The value should be a non-negative integer, with the default typically set to 0, meaning the process starts from the beginning of the text.

skip_every

The skip_every parameter allows you to specify intervals at which segments should be skipped. For example, a value of 1 would mean every other segment is skipped, while a value of 0 would mean no segments are skipped. This parameter is useful for reducing the number of segments processed, especially in large datasets.

max_count

The max_count parameter limits the number of segments that will be returned. This is useful for controlling the output size and ensuring that only a manageable number of segments are processed or analyzed. The value should be a positive integer, with the default typically set to a value that suits the specific application or dataset size.

TextSplitByDelimiter Output Parameters:

arr

The arr output parameter is a tuple containing the list of text segments that result from the splitting process. Each element in the list is a segment of the original text, divided according to the specified delimiter, starting index, skip interval, and maximum count. This output is essential for further processing or analysis, as it provides the organized and segmented text data.

TextSplitByDelimiter Usage Tips:

  • To ensure accurate splitting, choose a delimiter that does not appear within the text segments you wish to keep intact. This will prevent unintended splits and maintain the integrity of your data.
  • Utilize the start_index and max_count parameters to focus on specific sections of your text, especially when dealing with large datasets. This can help optimize performance and reduce processing time.

TextSplitByDelimiter Common Errors and Solutions:

Empty delimiter error

  • Explanation: If the delimiter is left empty, the node will treat the entire text as a single segment.
  • Solution: Ensure that you specify a valid delimiter to achieve the desired text segmentation.

Index out of range

  • Explanation: The start_index or max_count may exceed the number of available segments, leading to an index out of range error.
  • Solution: Verify that the start_index and max_count values are within the bounds of the text's segment count after splitting. Adjust these values as necessary to fit the text size.

TextSplitByDelimiter Related Nodes

Go back to the extension to check out more related nodes.
GeminiOllama ComfyUI Extension
RunComfy

© Copyright 2024 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.