Overview
This node converts Chinese text between different character sets and regional variants using the OpenCC library. It supports transformations such as Simplified Chinese to Traditional Chinese, Traditional Chinese to Simplified Chinese, Taiwan variant to Mainland China variant, and vice versa.
Common scenarios include:
- Preparing text content for audiences in different Chinese-speaking regions.
- Localizing user-generated content or documents by converting character sets.
- Standardizing text data before processing or analysis.
For example, a user can input Simplified Chinese text and convert it to Traditional Chinese for publication in Taiwan or Hong Kong.
Properties
Name | Meaning |
---|---|
Text | The Chinese text string that you want to convert. |
Conversion | The type of conversion to perform. Options: Simplified to Traditional, Traditional to Simplified, Taiwan to Mainland China, Mainland China to Taiwan. |
Output
The node outputs an array with one item per input. Each output item contains a json
object with a single field:
result
: The converted text string after applying the selected conversion.
If an error occurs during conversion and the node is set to continue on failure, the output will contain an error
field with the error message.
Dependencies
- Uses the
opencc-js
library for text conversion. - Uses a normalization helper module to adjust the converted text according to specific conversion rules.
- No external API keys or credentials are required.
Troubleshooting
- Common issues:
- Input text is empty or not valid Chinese characters, resulting in no meaningful conversion.
- Selecting an unsupported conversion option (though the UI limits this).
- Error messages:
- Errors thrown by the underlying conversion library will be caught and can be output if "Continue On Fail" is enabled.
- To resolve errors, ensure the input text is valid and the conversion option matches the intended transformation.