Visit ComfyUI Online for ready-to-use ComfyUI environment
Efficiently split text into segments based on delimiter for easier data processing in AI art projects.
The TextSplitByDelimiter
node is designed to help you efficiently split a block of text into smaller segments based on a specified delimiter. This can be particularly useful when you need to process or analyze text data in chunks, such as when working with lists, paragraphs, or any other text that needs to be divided into manageable parts. By using this node, you can easily break down large text inputs into smaller, more manageable pieces, making it easier to handle and manipulate text data for various applications in your AI art projects.
This parameter takes the input text that you want to split. It supports multiline text, allowing you to input large blocks of text that need to be divided. The text is processed as a string, and the node will use the specified delimiter to split this text into smaller segments.
This parameter specifies the character or string that will be used to split the input text. By default, the delimiter is set to a comma (,
), but you can customize it to any character or string that suits your needs. For example, you can use newline characters (\n
), spaces (
), or any other delimiter that is appropriate for your text data.
This parameter defines the starting index from which the text splitting should begin. It allows you to skip a certain number of initial segments if needed. The default value is 0, meaning the splitting will start from the beginning of the text. You can adjust this value to start splitting from a different position in the text.
This parameter allows you to specify how many segments to skip after each split. For example, if you set this value to 1, the node will skip every other segment. The default value is 0, meaning no segments will be skipped. This can be useful if you want to exclude certain segments from the output.
This parameter sets the maximum number of segments to be returned after splitting the text. The default value is 10, but you can adjust it to any number that fits your requirements. This helps in limiting the number of segments, especially when dealing with large text inputs.
The output of this node is a list of strings, where each string is a segment of the original text that has been split based on the specified delimiter. The segments are returned in the order they appear in the input text, starting from the specified start index and considering any segments to be skipped as per the skip_every
parameter.
.
) as the delimiter.,
).start_index
parameter to skip headers or introductory text that you do not need to process.max_count
parameter to limit the number of segments, which can be useful for large text inputs.start_index
parameter is set to a value that is out of range for the input text.start_index
to a valid position within the range of the input text length.max_count
parameter.max_count
parameter to accommodate more segments or refine your delimiter to produce fewer segments.© Copyright 2024 RunComfy. All Rights Reserved.