Entity management

更新时间:
复制 MD 格式

An entity is a collection of words of the same type, such as cities, dates, or colors. Entities are used to understand semantics. The system then extracts this information and outputs it in a machine-readable format. For example, if a user says, "I like green," a human knows that green is a color. However, a machine does not know this unless it is told beforehand. To help the machine understand "green," you can create a word library that lists common colors. When the machine encounters these words again, it recognizes them as colors.

Create a standard entity

In daily life and business, many different words can represent the same meaning. For example, "Beijing," "Imperial Capital," and "Capital of China" all refer to the same city. You can configure these words to belong to a single, fixed entity.

For example, you can create an entity for train seat classes and define two different seat levels within this entity. This entity can then be used directly in an intent.

Regex entity

A regular expression (regex) is a pattern used to match and replace text. A regex consists of normal characters, such as 'a' to 'z', and special characters called metacharacters. It acts as a template to find matching strings within a body of text.

image

System entity

To speed up the configuration of conversation flows, the system provides many preset entities that you can use directly.

Interface name

Chinese meaning

Entity explanation

Example

Standard value (detected format)

@sys.number

System.Number

Parses all numbers in a sentence, including Chinese and Arabic numerals.

One hundred twenty-five, 100, zero point three

123

@sys.phone-number

System.Phone number

Parses mobile phone numbers.

1*78*****

1*78*****

@sys.date

System.Date

Parses all date expressions.

Tomorrow, next Monday, March 20th, June next year, National Day, 2017-10-5

2017-11-11

@sys.time

System.Time

Parses times within a day.

Nine in the morning, 12:30 PM, a quarter past eight in the evening

12:10:15

@sys.date-time

System.Date and time

Parses dates and times together.

Tomorrow at 12:30 PM, next Wednesday at a quarter past eight in the morning

2017-11-11 10:00:00

@sys.geo-city

System.City

Parses all cities in China.

Beijing, Hangzhou, Shanghai

Beijing City

@sys.geo-province

System.Province

Parses all provinces in China.

Zhejiang, Hebei

Zhejiang Province

@sys.geo-country

System.Country

Parses all countries in the world.

China, Singapore, Mauritius

China

@sys.age

System.Age

Parses age numbers.

15 years old, 30, fifty years old

30

@sys.address

System.Address

Parses complex, multi-level addresses.

No. 882, Julu Road, Jing'an District, Shanghai, China

No. 882, Julu Road, Jing'an District, Shanghai, China

@sys.geo-district

System.District/County

Parses standard districts and counties.

Chaoyang District

Chaoyang District

@sys.name

System.Person's name

Lu Xun

Lu Xun

@sys.duration

System.Duration

Parses a time period or duration.

One hour, 15 minutes, one hour and five minutes, etc.

@sys.timeset

System.Recurring time

Parses a recurring time point entity.

Every Monday, every workday, etc.

@sys.money

System.Monetary amount

Parses monetary amounts.

200 CNY

@sys.temperature

System.Temperature

Parses temperatures.

20 degrees, 90 degrees Celsius, 20.5 degrees Fahrenheit

@sys.numberrange

System.Number range

Parses number ranges.

One to five, greater than 10

@sys.plate-number

System.License plate number

Parses license plate numbers.

Zhe A12345

Zhe A12345

@sys.surname

Built-in Hundred Family Surnames

Parses surnames.

Zhang

Zhang

@sys.numberfraction

System.Fraction

Parses fractions.

One-third, 1/3

1/3

@sys.percentage

System Percentage

Parses percentages.

20 percent, 20%

20%

Entity management

image

Rename: Renames an entity. Note: The entity name is the unique identifier for an entity. Do not change the name after the entity is in use. Configure entity: Configures the details of an entity. For standard entities, you can configure entity members and their synonyms. For regex entities, you can configure the regular expression. Publish: Publishes the entity configuration to the online environment. When you publish a chatbot, its entities are published automatically. Use this feature only if you modify an entity's configuration separately. Export: You can export a single entity, multiple entities in a batch, or all entities. The exported file contains basic entity information, such as the name and type, and the entity configuration. Do not edit the basic information in the exported file. You can add to the entity configuration in the file. After you import the file, the configurations are automatically merged. Import: You can import entities to add new entity members, synonyms, or regular expressions. Search: You can search for entities within the bot by entity name.