You can use the LLM-Text Normalizer (DLC) component of Platform for AI (PAI) to perform operations such as Unicode text normalization or language conversion from traditional to simplified Chinese. The input Object Storage Service (OSS) data file must be in the JSON Lines format and meet the following requirements: Each line in the file is a valid JSON object and the file consists of multiple lines of JSON objects, but the file is not a valid JSON object. For more information, see Example.
Supported computing resources
Algorithm description
The LLM-Text Normalizer (DLC) component supports the following features:
Unicode text normalization by using the Normalization Form Compatibility Composition (NFKC) method.
ftfy.fix_text(text, normalization='NFKC')
Language conversion from traditional to simplified Chinese by using the opencc package.
Examples:
Before processing | After processing |
Configure the component
On the pipeline page of Machine Learning Designer, configure the parameters of the LLM-Text Normalizer (DLC) component.
Tab | Parameter | Required | Description | Default value | |
Fields Setting | Target Process Field | Yes | The name of the field that you want to process. | N/A | |
Whether to normalize Unicode text (NFKC form) | No | Specifies whether to normalize the Unicode text by using the NFKC method. | Selected | ||
Whether to convert traditional to simplified chinese | No | Specifies whether to convert traditional to simplified Chinese | Selected | ||
OSS Directory for Saving OutputData | No | The OSS directory in which the generated data is stored. If you do not specify this parameter, the default path of the workspace is used. | N/A | ||
Tuning | Number of Processes | No | The number of processes. | 8 | |
Select Resource Group | Public Resource Group | No | The instance type (CPU or GPU), number of instances, and virtual private cloud (VPC) that you want to use. | N/A | |
Dedicated resource group | No | The number of vCPUs, memory, shared memory, number of GPUs, and number of instances that you want to use. | N/A | ||
Maximum Running Duration | No | The maximum period of time for which the component can run. If this period of time is exceeded, the job is terminated. | N/A |