Entities

更新时间:
复制 MD 格式

An entity is a collection of similar words, such as cities, dates, or colors. The system uses entities to understand semantics. It extracts them and outputs them in a machine-readable format. For example, a user might say, "I like green." A machine does not know that green is a color unless you tell it. To teach the machine, you can create a dictionary of common colors. Then, the machine can recognize these words as colors.

Create a standard entity

In daily life and business, different words can mean the same thing. 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 entity.

You can create an entity for train seat classes and define different seat levels within it. You can then use this entity directly in an intent.

Create an entity from an intent

You can also use a shortcut to create an entity from an intent.

System entities

Dialog Studio provides many pre-built system entities to help you get started quickly.

Interface name

Meaning

Description

Example

sys.number

System.Number

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

one hundred twenty-five, 100, zero point three

sys.phone-number

System.Phone Number

Parses mobile phone numbers.

1*78*******

sys.date

System.Date

Parses all date expressions.

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

sys.time

System.Time

Parses times of the day.

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

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

sys.geo-city

System.City

Parses all cities in China.

Beijing, Hangzhou, Shanghai

sys.geo-province

System.Province

Parses all provinces in China.

Zhejiang, Hebei

sys.geo-country

System.Country

Parses all countries in the world.

China, Singapore, Mauritius

sys.age

System.Age

Parses age numbers.

15 years old, 30, fifty years old

sys.address

System.Address

Parses complex, multi-level addresses.

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

sys.email

System.Email

Parses standard mailboxes.

de***@163.com, 12***@qq.com

sys.duration

System.Duration

Parses a time period or duration.

one hour, 15 minutes, one hour and five minutes

sys.timeset

System.Recurring Time

Parses a recurring time point entity.

every Monday, every workday

sys.ordinal

System.Ordinal

Parses ordinal numbers.

first, second

sys.express

System.Express Delivery

Parses express delivery services.

SF Express, ZTO Express

sys.receipt_object

System.Invoice Object

Parses invoice objects in the E-commerce realm, such as individuals.

individual, enterprise

sys.receipt_type

System.Invoice Type

Parses invoice types in the E-commerce realm, such as electronic invoicing.

electronic invoicing, paper invoice

sys.receipt_form

System.Invoice Form

Parses invoice forms in the E-commerce realm, such as value-added tax.

value-added tax

Create a regular expression entity

A regular expression is a sequence of characters that specifies a search pattern. This pattern consists of ordinary characters, such as 'a' through 'z', and special characters, called metacharacters. You can use regular expressions to match patterns in strings.

正则实体

Regular expression rules

12345.png