Chinese word segmentation (O2O)
Chinese word segmentation (Premium Edition - O2O realm)
Usage notes
This is a Premium Edition feature. You can call this API operation for free after you subscribe to the Premium Edition. To subscribe, click here to activate.
Supported language: Chinese
Supported realm: O2O
Description: This feature segments continuous natural language text into a sequence of semantically complete and meaningful words.
Request parameters
Name | Type | Required | Example value | Description |
Action | String | Yes | GetWsCustomizedChO2O | A required parameter. Set the value to GetWsCustomizedChO2O. |
ServiceCode | String | Yes | alinlp | A static field. The value must be alinlp. |
Text | String | Yes | Please enter text | The text to analyze. The maximum length is 1024 characters. |
TokenizerId | String | Yes | O2O | Static field: O2O |
OutType | String | No | 1 | 0: large granularity, 1: medium granularity (default), 2: small granularity |
Returned Data
Name | Type | Sample value | Description |
Data | String | |
|
RequestId | String | FA53D08F-37D1-4D81-BEE7-41F24E825F60 | The unique ID of the request. Use this ID to troubleshoot issues. |
API access
To access the API using code, see Quick Start.
To try the API online, see Online trial.
Error codes
If an error occurs when you call this operation, find the error code in the following table to determine the cause and solution.
HttpCode | Error code | Error message | Description |
400 | UserStatusInvalid | The user status is invalid. | The user status is invalid. Check if your account has an overdue payment or an unpaid bill. |
400 | BasicServiceNotActivated | The NLP API (Version : base) service has not been activated. Please click the url to confirm the activation status: https://common-buy.aliyun.com/?commodityCode=nlp_alinlpBasePost_public_cn#/buy | The NLP API (Basic Edition) service is not activated. Click the link to check the activation status: https://common-buy.aliyun.com/?commodityCode=nlp_alinlpBasePost_public_cn#/buy |
400 | AdvancedServiceNotActivated | The NLP API (Version : advanced) service has not been activated. Please click the url to confirm the activation status: https://common-buy.aliyun.com/?commodityCode=nlp_alinlpAdvancedPost_public_cn#/buy | The NLP API (Premium Edition) service is not activated. Click the link to check the activation status: https://common-buy.aliyun.com/?commodityCode=nlp_alinlpAdvancedPost_public_cn#/buy |
400 | IndustryServiceNotActivated | The NLP API (Version : industry) service has not been activated. Please click the url to confirm the activation status:https://common-buy.aliyun.com/?commodityCode=nlp_alinlpIndustryPost_public_cn#/buy | The NLP API (Industry Application Edition) service is not activated. Click the link to check the activation status: https://common-buy.aliyun.com/?commodityCode=nlp_alinlpIndustryPost_public_cn#/buy |
401 | InvalidParameter | The parameter is invalid. | The parameter is invalid. Check the request parameters. |
403 | Forbidden.NoAuth | You are not authorized to operate on the specified resource. Please click the URL for help information:https://help.aliyun.com/document_detail/177209.html | Your account does not have the permission to operate on the specified resource. Click the URL for help: https://help.aliyun.com/document_detail/177209.html |
405 | TextLimitExceeded | The maximum length of the text is exceeded. | The text length exceeds the limit. |
406 | TextCodingError | An encoding error occurred to the input text. | The input text has an encoding error. |
410 | FrameworkError | Framework internal server error. | Framework error. |
411 | FrameworkApiError | Framework API error. | Framework API error. |
412 | FrameworkFormatError | Framework request format error. | The request is in an invalid format for the framework. |
413 | FrameworkReturnError | Framework return type format error. | The response is in an invalid format for the framework. |
429 | Throttling.User | Flow control has been triggered. | The number of queries per second (QPS) exceeds the limit. Click the URL for help: https://help.aliyun.com/document_detail/69780.html#p-wq5-zb9-5wu |
500 | InternalError | A server error occurred while processing your request. Please try again later or contact customer support. | A server error occurred while processing your request. Try again later or contact customer support. |