ComfyUI  >  Nodes  >  qq-nodes-comfyui >  Text Splitter

ComfyUI Node: Text Splitter

Class Name

Text Splitter

Category
QQNodes/Text
Author
kenjiqq (Account age: 5003 days)
Extension
qq-nodes-comfyui
Latest Updated
10/1/2024
Github Stars
0.0K

How to Install qq-nodes-comfyui

Install this extension via the ComfyUI Manager by searching for  qq-nodes-comfyui
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter qq-nodes-comfyui 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

Text Splitter Description

Efficiently splits text into substrings based on a specified delimiter for enhanced text analysis and manipulation.

Text Splitter:

The Text Splitter node is designed to help you break down a string of text into smaller, more manageable pieces based on a specified delimiter. This can be particularly useful when you need to process or analyze individual components of a larger text, such as separating words, phrases, or data entries. By splitting the text, you can easily manipulate and work with each segment independently, enhancing your ability to perform detailed text analysis or transformation tasks. The main goal of this node is to provide a straightforward and efficient way to divide text into a list of substrings, making it easier to handle and process text data in your AI art projects.

Text Splitter Input Parameters:

text

This parameter represents the string of text that you want to split. It is the main input for the node and will be divided into smaller parts based on the specified delimiter. The default value is an empty string (""), meaning you need to provide the text you wish to split.

delimiter

The delimiter is the character or sequence of characters that will be used to split the text. It defines the points at which the text will be divided into separate substrings. The default value is a comma (","), but you can specify any delimiter that suits your needs, such as spaces, semicolons, or custom strings.

Text Splitter Output Parameters:

LIST

The output of the Text Splitter node is a list of substrings obtained by splitting the input text based on the specified delimiter. Each element in the list represents a segment of the original text, allowing you to work with these individual parts separately. This output is crucial for tasks that require detailed text manipulation or analysis.

Text Splitter Usage Tips:

  • Use a delimiter that clearly separates the elements you want to extract from the text to avoid unintended splits.
  • If your text contains multiple types of delimiters, consider preprocessing the text to standardize the delimiters before using the Text Splitter node.
  • For large texts, ensure that the delimiter is unique enough to prevent excessive splitting, which could result in too many small, unusable segments.

Text Splitter Common Errors and Solutions:

"Invalid delimiter: None"

  • Explanation: This error occurs when the delimiter is not specified or is set to None.
  • Solution: Ensure that you provide a valid delimiter string. The delimiter should be a character or sequence of characters that exist within the text you want to split.

"Text input is empty"

  • Explanation: This error occurs when the text input is an empty string.
  • Solution: Provide a non-empty string as the text input to be split. Ensure that the text contains the delimiter to achieve the desired splitting.

"Delimiter not found in text"

  • Explanation: This error occurs when the specified delimiter is not present in the text.
  • Solution: Verify that the delimiter you have chosen exists within the text. If not, choose a different delimiter that matches the structure of your text.

Text Splitter Related Nodes

Go back to the extension to check out more related nodes.
qq-nodes-comfyui
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.