Medical named entity recognition

更新时间:
复制 MD 格式

Medical named entity recognition (Industry Edition)

Usage notes

  • This service is a feature of the Industry Edition. You must activate the Industry Edition to call this service for free. You can activate the service here: Activate service

  • After activating the service, purchase a resource plan to make calls: Purchase resource plan

  • Supported language: Chinese

  • Supported industry: Medical

Request parameters

Name

Type

Required

Sample value

Description

Action

String

Yes

GetNerChMedical

A required parameter. Set the value to GetNerChMedical.

ServiceCode

String

Yes

alinlp

A static field. Only alinlp is supported.

Text

String

Yes

A chest CT scan at the local hospital reported "a high-density shade with a cavity in the lower lobe of the left lung".

The text to recognize. The text must be less than 256 characters in length.

Return data

Name

Type

Example value

Description

Data

String

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

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

RequestId

String

{
  "result": {
    "ner": [
      {
        "attr_probability": [],
        "attributes": [],
        "begin_char": 6,
        "children": [],
        "end_char": 7,
        "id": 0,
        "parent": [
          1
        ],
        "probability": [
          0.5993586778640747
        ],
        "text": "chest",
        "type": [
          "Anatomy"
        ]
      },
      {
        "attr_probability": [
          0.8909370303153992
        ],
        "attributes": [
          "PAST"
        ],
        "begin_char": 6,
        "children": [
          0
        ],
        "end_char": 11,
        "id": 1,
        "parent": [],
        "probability": [
          0.6000467538833618
        ],
        "text": "chest CT scan",
        "type": [
          "Test-name"
        ]
      },
      {
        "attr_probability": [
          0.9525512456893921
        ],
        "attributes": [
          "PAST"
        ],
        "begin_char": 17,
        "children": [
          3,
          4
        ],
        "end_char": 20,
        "id": 2,
        "parent": [],
        "probability": [
          0.847745418548584
        ],
        "text": "lower lobe of the left lung",
        "type": [
          "Anatomy"
        ]
      },
      {
        "attr_probability": [],
        "attributes": [],
        "begin_char": 17,
        "children": [],
        "end_char": 17,
        "id": 3,
        "parent": [
          2
        ],
        "probability": [
          0.7
        ],
        "text": "left",
        "type": [
          "Location"
        ]
      },
      {
        "attr_probability": [],
        "attributes": [],
        "begin_char": 19,
        "children": [],
        "end_char": 19,
        "id": 4,
        "parent": [
          2
        ],
        "probability": [
          0.7
        ],
        "text": "lower",
        "type": [
          "Location"
        ]
      }
    ],
    "text": "A chest CT scan was performed at the local hospital, and the report indicated a high-density shade with a cavity in the lower lobe of the left lung"
  },
  "success": true
}
  • ner: A list where each element is a recognized entity.

  • text: A string that represents the input text.

  • attr_probability: A list of doubles. These are the probabilities of the attributes, corresponding to the attributes list.

  • attributes: The recognized attributes, corresponding to the attr_probability list.

  • begin_char: The start position of the entity (inclusive).

  • children: The IDs of child entities that are nested within this entity.

  • end_char: The end position of the entity (inclusive).

  • id: The ordinal number of the entity.

  • parent: The ID of the parent entity that this entity is nested within.

  • probability: The probabilities of the entity types, corresponding to the type list.

  • text: The text of the entity.

  • type: The recognized entity types, corresponding to the probability list.

API access

  1. To access the API using code, see Quick Start.

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

Error codes

If an error occurs during a call, refer to the following table for the error description, cause, and solution.

HTTP code

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 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.