Visit ComfyUI Online for ready-to-use ComfyUI environment
Versatile text data manipulation tool with various filtering options for streamlining and refining text processing efficiently.
The StarTextFilter node is a versatile tool designed to manipulate and refine text data by applying various filtering techniques. Its primary purpose is to streamline text processing by removing unwanted elements such as empty lines, excessive whitespace, or specific text segments between defined words. This node is particularly beneficial for cleaning up text data, making it more readable and structured, which is essential for tasks that require precise text input. By offering a range of filtering options, the StarTextFilter node allows you to customize the text processing to suit your specific needs, ensuring that the output is tailored to your requirements. Whether you need to strip lines of unnecessary spaces or remove text between certain keywords, this node provides a straightforward and efficient solution.
The text
parameter is the main input for the node, where you provide the string data that you want to process. This parameter accepts multiline strings, allowing you to input complex text data that may span several lines. The content of this parameter is crucial as it determines the scope of the filtering operations applied by the node.
The filter_type
parameter specifies the type of filtering operation you wish to perform on the input text. It offers several options, including remove_between_words
, remove_before_start_word
, remove_after_end_word
, remove_empty_lines
, remove_whitespace
, and strip_lines
. Each option targets a specific aspect of the text, such as removing text between specified words or eliminating extra spaces. This parameter is essential for directing the node's functionality and achieving the desired text output.
The start_word
parameter is used in conjunction with certain filter types, such as remove_between_words
and remove_before_start_word
. It defines the starting point for the filtering operation, allowing you to specify a word or phrase that marks the beginning of the text segment you want to manipulate. The default value is "INPUT", but you can customize it to match your specific requirements.
Similar to start_word
, the end_word
parameter is utilized with filter types like remove_between_words
and remove_after_end_word
. It indicates the endpoint for the filtering operation, enabling you to define a word or phrase that marks the end of the text segment you wish to alter. The default value is "INPUT", and it can be adjusted to fit the context of your text processing task.
The output of the StarTextFilter node is a single string, which is the processed version of the input text after the specified filtering operations have been applied. This output is crucial as it represents the refined text data, free from unwanted elements, and ready for further use in your projects. The output string maintains the structure and content integrity of the original text, ensuring that only the specified modifications are made.
remove_empty_lines
filter type. This is particularly useful for cleaning up text that has been copied from sources with inconsistent formatting.remove_whitespace
filter type. This can be helpful when preparing text for environments where spacing is not preserved.remove_between_words
filter type to delete text between specific start and end words. This is ideal for extracting relevant information from structured text data.text
parameter is left empty or not provided.text
parameter before executing the node.filter_type
parameter.start_word
or end_word
is not present in the input text.start_word
and end_word
are correctly specified and exist within the text. Adjust them if necessary to match the content.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.