首页 English text correction

English text correction

更新时间: 2026-01-15 16:24:56

Text correction (Premium - General - English)

Prerequisites

  • This service is a feature of the Premium Edition. You must activate the Premium Edition to use this service for free. Click Confirm activation to check your activation status.

  • Supported language: English

  • Supported realm: General

  • Description: This feature accurately detects spelling errors in the input text, identifies their positions, and provides correction suggestions.

Request parameters

Name

Type

Required

Example value

Description

Action

String

Yes

GetEcEnGeneral

A required parameter. Set the value to GetEcEnGeneral.

ServiceCode

String

Yes

alinlp

A static field. The only supported value is alinlp.

Text

String

Yes

Leave a messege for me ,thanks babbbbbb

The text to correct. The maximum length is 512 characters.

Response data

Name

Type

Example value

Description

Data

String

{
  "result": {
    "edits": [
      {
        "confidence": 0.9,
        "pos": 8,
        "src": "messege",
        "tgt": "message",
        "type": "SpellingError"
      },
      {
        "confidence": 0.9,
        "pos": 22,
        "src": " ,",
        "tgt": ", ",
        "type": "FormatError"
      },
      {
        "confidence": 0.9,
        "pos": 31,
        "src": "babbbbbb",
        "tgt": "babbbbbb",
        "type": "UnknownWord"
      }
    ],
    "source": "Leave a messege for me ,thanks babbbbbb",
    "target": "Leave a message for me, thanks babbbbbb"
  }
}
  • source: The input text to correct.

  • target: The corrected text.

  • edits: The corrections made. This includes the confidence level (a static value of 0.9), the position of the edit (`pos`, starting from index 0), the original segment (`src`), the corrected segment (`tgt`), and the error type (`type`). Error types include `SpellingError`, `FormatError`, and `UnknownWord` (potential error).

RequestId

String

FA53D08F-37D1-4D81-BEE7-41F24E825F60

The unique ID of the request. Use this ID to troubleshoot issues.

API access

  1. For more information about code-based access, see Quick Start.

  2. To try the service online, see Online trial.

Error codes

If an error occurs during a call, refer to the following table for its description, 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 overdue payments or unpaid bills.

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 Natural Language Processing (NLP) API (Basic Edition) service is not activated. Click the link to confirm 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 confirm 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 confirm 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 permissions 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.

A framework error occurred.

411

FrameworkApiError

Framework API error.

A framework API error occurred.

412

FrameworkFormatError

Framework request format error.

The framework request has a format error.

413

FrameworkReturnError

Framework return type format error.

The framework response has a format error.

429

Throttling.User

Flow control has been triggered.

The maximum number of queries per second (QPS) is exceeded. 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.

阿里云首页 自然语言处理 相关技术圈