Visit ComfyUI Online for ready-to-use ComfyUI environment
Text normalization for natural language processing, including digit-to-word conversion and multilingual support.
The TextNode is designed to process and normalize text data, making it suitable for various natural language processing tasks. This node is particularly useful for converting numerical digits into words, cleaning and normalizing text, and handling multilingual text normalization. It ensures that the text is in a consistent format, which is essential for downstream tasks such as text-to-speech, machine translation, or any other AI-driven text analysis. By leveraging different normalization techniques, the TextNode helps in maintaining the integrity and readability of the text, making it a crucial component in any text processing pipeline.
The text
parameter is the primary input for the TextNode, representing the raw text that needs to be processed. This parameter accepts a string of text which can include numerical digits, punctuation, and multilingual characters. The function of this parameter is to provide the text that will undergo normalization and cleaning processes. There are no specific minimum or maximum values for this parameter, but it should be a valid string. The default value is an empty string.
The inflect_parser
parameter is used to convert numerical digits within the text into their corresponding word forms. This parameter is essential for ensuring that numbers are represented consistently in the text. The function of this parameter is to facilitate the conversion of digits to words, which is particularly useful for text-to-speech applications. There are no specific minimum or maximum values for this parameter, but it should be an instance of a parser capable of handling number-to-word conversion. The default value is None
.
The cleaner_names
parameter is a list of cleaner functions that will be applied to the text. Each cleaner function is responsible for a specific type of text normalization, such as removing unwanted characters or converting text to a standard format. The function of this parameter is to specify the sequence of cleaning operations that will be performed on the text. There are no specific minimum or maximum values for this parameter, but it should be a list of valid cleaner function names. The default value is an empty list.
The normalized_text
parameter is the primary output of the TextNode, representing the cleaned and normalized version of the input text. This output is crucial for ensuring that the text is in a consistent and readable format, suitable for further processing or analysis. The function of this parameter is to provide the final, processed text after all normalization and cleaning operations have been applied. The output is a string that reflects the normalized version of the input text.
text
input is a valid string to avoid any processing errors.inflect_parser
parameter to convert numerical digits into words for better readability and consistency.cleaner_names
parameter to apply multiple cleaning operations in sequence.normalized_text
to ensure that the text has been processed as expected.cleaner_names
parameter is not recognized.cleaner_names
parameter are valid and correctly spelled.text
parameter is not a valid string.text
parameter is a valid string before passing it to the TextNode.inflect_parser
parameter is not provided or is None
.inflect_parser
parameter to enable number-to-word conversion.© Copyright 2024 RunComfy. All Rights Reserved.