All Products
Search
Document Center

Platform For AI:LLM-Quality Predict and Language Recognition-FastText (DLC)

Last Updated:Dec 18, 2024

The LLM-Quality Predict and Language Recognition-FastText (DLC) component of Platform for AI (PAI) is used to recognize the language and calculate the scores of texts, and filter the texts based on their languages and scores. 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

Deep Learning Containers (DLC)

Algorithm description

The algorithm uses FastText to recognize the language of the texts and calculate a confidence score. The algorithm can recognize 176 languages. The languages are represented by the following codes:

['af', 'als', 'am', 'an', 'ar', 'arz', 'as', 'ast', 'av', 'az', 'azb', 'ba', 'bar', 'bcl', 'be', 'bg', 'bh', 'bn', 'bo', 'bpy', 'br', 'bs', 'bxr', 'ca', 'cbk', 'ce', 'ceb', 'ckb', 'co', 'cs', 'cv', 'cy', 'da', 'de', 'diq', 'dsb', 'dty', 'dv', 'el', 'eml', 'en', 'eo', 'es', 'et', 'eu', 'fa', 'fi', 'fr', 'frr', 'fy', 'ga', 'gd', 'gl', 'gn', 'gom', 'gu', 'gv', 'he', 'hi', 'hif', 'hr', 'hsb', 'ht', 'hu', 'hy', 'ia', 'id', 'ie', 'ilo', 'io', 'is', 'it', 'ja', 'jbo', 'jv', 'ka', 'kk', 'km', 'kn', 'ko', 'krc', 'ku', 'kv', 'kw', 'ky', 'la', 'lb', 'lez', 'li', 'lmo', 'lo', 'lrc', 'lt', 'lv', 'mai', 'mg', 'mhr', 'min', 'mk', 'ml', 'mn', 'mr', 'mrj', 'ms', 'mt', 'mwl', 'my', 'myv', 'mzn', 'nah', 'nap', 'nds', 'ne', 'new', 'nl', 'nn', 'no', 'oc', 'or', 'os', 'pa', 'pam', 'pfl', 'pl', 'pms', 'pnb', 'ps', 'pt', 'qu', 'rm', 'ro', 'ru', 'rue', 'sa', 'sah', 'sc', 'scn', 'sco', 'sd', 'sh', 'si', 'sk', 'sl', 'so', 'sq', 'sr', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'tk', 'tl', 'tr', 'tt', 'tyv', 'ug', 'uk', 'ur', 'uz', 'vec', 'vep', 'vi', 'vls', 'vo', 'wa', 'war', 'wuu', 'xal', 'xmf', 'yi', 'yo', 'yue', 'zh'].

Configure the component

On the pipeline page of Machine Learning Designer, configure the parameters of the LLM-Quality Predict and Language Recognition-FastText (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

Language ID Name

Yes

The ID of the language. The algorithm filters texts based on the language name and the minimum score. Separate multiple language names with commas (,). Example: en,zh. The algorithm can recognize 176 languages. To view the languages, see Algorithm description.

N/A

Minimum Score

Yes

Texts that have a score lower than this value are filtered out.

N/A

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