π³ζζ¬ζΈ ηε¨:
The TextCleanerNode is designed to streamline and enhance your text processing tasks by providing a robust mechanism for cleaning and refining text data. This node is particularly useful for removing unwanted tags or keywords from text, or for eliminating entire sentences that contain specific tags. By offering two distinct modes of operation, it allows you to either strip out specific tags or phrases from the text or to remove sentences that include these tags, thereby ensuring that your text data is clean and free from irrelevant or distracting content. This functionality is especially beneficial for AI artists and content creators who need to prepare text data for further processing or analysis, ensuring that the final output is both relevant and concise.
π³ζζ¬ζΈ ηε¨ Input Parameters:
text
This parameter represents the input text that you wish to clean. It is a multiline string, allowing you to input large blocks of text that may contain multiple sentences or paragraphs. The text parameter is crucial as it serves as the primary data source that the node will process to remove unwanted content based on the specified tags and mode.
tags
The tags parameter is a multiline string that contains the specific tags or keywords you want to remove from the text. These tags can be separated by various punctuation marks, including commas, semicolons, and spaces, among others. The node will parse these tags and use them to identify which parts of the text should be removed, either as individual tags or as part of sentences containing these tags.
mode
This parameter determines the cleaning method applied to the text. It offers two options: "ε ι€ε ε«ζ ηΎ/ζη€Ίθ―ηε₯ε" (Delete sentences containing tags/keywords) and "ε ι€ζ ηΎ/ζη€Ίθ―" (Delete tags/keywords). The default mode is "ε ι€ε ε«ζ ηΎ/ζη€Ίθ―ηε₯ε". The mode you choose will significantly impact the node's execution, as it dictates whether the node will remove entire sentences or just the specified tags from the text.
π³ζζ¬ζΈ ηε¨ Output Parameters:
cleaned_text
The cleaned_text output parameter provides the resulting text after the cleaning process has been applied. This output is a string that reflects the input text with the specified tags or sentences containing those tags removed, depending on the selected mode. The cleaned_text is essential for users who need a refined version of their text data, free from unwanted elements, and ready for further use or analysis.
π³ζζ¬ζΈ ηε¨ Usage Tips:
- To effectively remove specific keywords from your text, use the "ε ι€ζ ηΎ/ζη€Ίθ―" mode and ensure that your tags parameter includes all variations of the keywords you wish to eliminate.
- When dealing with text that contains sensitive or irrelevant information, opt for the "ε ι€ε ε«ζ ηΎ/ζη€Ίθ―ηε₯ε" mode to ensure entire sentences containing those tags are removed, providing a cleaner and more focused text output.
- Regularly update your tags list to include new or emerging keywords that may need to be filtered out from your text data.
π³ζζ¬ζΈ ηε¨ Common Errors and Solutions:
No tags provided
- Explanation: This error occurs when the tags parameter is left empty, resulting in no cleaning action being performed on the text.
- Solution: Ensure that you provide a list of tags or keywords in the tags parameter to enable the node to perform the cleaning operation.
Invalid mode selection
- Explanation: This error arises when an unsupported mode is selected, preventing the node from executing the cleaning process.
- Solution: Verify that the mode parameter is set to one of the supported options: "ε ι€ε ε«ζ ηΎ/ζη€Ίθ―ηε₯ε" or "ε ι€ζ ηΎ/ζη€Ίθ―". Adjust the mode accordingly to proceed with the text cleaning.
