This section describes parameters in the jsonObject field of the Entity return value.
Identifies date and time in the text. The return type is JSONObject with the key time. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| repeat | string | No | Cycle. |
| rrule | string | No | Cycle identifier, which may not be accurate (for reference only, not recommended). The value of repeat shall prevail. |
| start | string | No | Start time. Examples: 1. 2021-08-28T08:00:00 (date and exact time) 2. 2021-08-28TM (date and fuzzy time) 3. 2021-08-28 (date) 4. T08:00:00 (recurring time without date, which indicates every day at 8:00 a.m.) 5. TM (recurring time without date, which indicates every morning) NOTE T is the separator. The part before T is date (year, month, and day), and the part after T is time (exact or granularity-based fuzzy time). |
| suggestStart | string | No | Specific start time. In most cases, the value of suggestStart is the same as that of start. However, when the text implies a time range (for example, "January"), the two values are different, and suggestStart provides the start date of the time range. Examples: 1. When the text is "January", start is 2021-01, end is 2021-01, suggestStart is 2021-01-01, and suggestEnd is 2021-01-31. 2. When the text is "January to March", start is 2021-01, end is 2021-03, suggestStart is 2021-01-01, and suggestEnd is 2021-03-31. |
| startTimestamp | number | No | Start timestamp, in milliseconds. If the value of start is a fuzzy time, the timestamp may be inaccurate. You are advised to use the value of suggestStart as the specific start time. |
| end | string | No | End time. |
| suggestEnd | string | No | Specific end time. In most cases, the value of suggestEnd is the same as that of end. However, when the text implies a time range, the two values are different. |
| endTimestamp | number | No | End timestamp, in milliseconds. If the value of end is a fuzzy time, the timestamp may be inaccurate. You are advised to use the value of suggestEnd as the specific end time. |
| maxSection | string | No | Maximum time granularity. P: precise time. M: morning. F: forenoon. N: noon. A: afternoon. L: dusk. E: evening. W: wee hours. |
| minSection | string | No | Minimum time granularity. |
| isContainFuzzyTime | boolean | Yes | Indicates whether fuzzy time is included. true: yes; false: no. The default value is false. |
| containFuzzySection | string | Yes | Fuzzy time granularity, which defaults to D if fuzzy time is not included. D indicates the daily granularity, meaning fuzzy time is processed by day. |
| inferType | string | No | Time inference type enumeration. |
| rangeDecoration | string | No | Range description. |
| rangeText | string | No | Text with range description. |
| isFestival | boolean | No | Indicates whether the time refers to a festival. true: yes; false: no. |
| normalFestival | string | No | Normalized festival value. |
| isLunarTime | boolean | No | Indicates whether lunar calendar time is included. true: yes; false: no. |
| startLunarTime | string | No | Lunar calendar time. |
| isSolarTerm | boolean | No | Indicates whether the time refers to a solar term. true: yes; false: no. |
| isIllegal | boolean | No | Indicates whether the time is invalid. true: yes; false: no. The default value is false. Note: Generally, non-standard time expressions are not identified. A time expression is identified and marked with the invalid flag only when it occurs frequently and is special in specific service scenarios. Most non-standard time expressions will be ignored, or even if they are identified as invalid, there is no impact. Examples: 1. For "February 30", start is adjusted to February 29 or 28, and isIllegal is set to true. 2. For "8:00 a.m. every week", the specific day of the week is missing. repeat is set to the current day of the week by default, and isIllegal is set to true. 3. For "8:00 a.m. on Monday of each month", the specific day of the month is missing. 4. For "9:00 a.m. on the 8th day of each year", the specific month of the year is missing. |
| isChangedIllegal | boolean | Yes | Indicates whether the invalid time is automatically corrected. true: yes; false: no. |
| isPlusTwelveHour | boolean | Yes | Indicates whether fuzzy time within a day is included. true: yes; false: no. |
| sequence | number | Yes | Occurrence frequency of the entity. |
| oriFestival | string | No | Original festival text in the time expression. |
| timestampZone | string | Yes | Time zone of the timestamp, that is, the time zone in device settings. |
| originTimestamp | number | Yes | Timestamp from the input text, that is, the time when the device reports the data. |
Identifies locations in the text. The return type is JSONObject with the key location. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| type | string | Yes | Actual type of the core location at the top level. For example, the text is "post office next to the bank". type is the type of a postal office. |
| coreLocation | JSONObject | Yes | Set of elements that compose the core location information. Example: coreLocation is the analysis result of the elements corresponding to "post office". |
| adornLocation | JSONObject | No | Set of elements that modify the core location, referencing the definition of location. Example: adornLocation is the analysis result of the elements corresponding to "next to the bank". |
| isAbstract | number | No | 0: non-abstract location. 1: abstract location related to the intent. The default value is 0. |
The following table lists the sub-parameters of coreLocation.
| Sub-parameter | Type | Mandatory | Description |
|---|---|---|---|
| oriText | string | Yes | Original location text. |
| value | string | No | Core location information (location text after secondary locations and modifiers such as "next to" and "near" are removed). Example: post office. If the part-of-speech tag starts with "nsf" or "nsw", only value needs to be set. |
| province | JSONObject | No | Province mentioned in the original text. |
| city | JSONObject | No | City mentioned in the original text. |
| county | JSONObject | No | County mentioned in the original text. |
| district | JSONObject | No | Administrative district mentioned in the original text, for example, Jiangning District. |
| subDistrict | JSONObject | No | Sub-district/Community. |
| town | JSONObject | No | Town. |
| village | JSONObject | No | Village. |
| subVillage | JSONObject | No | Group in a village. |
| region | JSONObject | No | Reference object, which is a fixed business district or area (excluding administrative areas). It corresponds to the region field in Dianping, but the recognition scope is broader than that of the corresponding field in Dianping. |
| road | JSONObject | No | Road. |
| default | JSONObject | No | Unclassified area, which is used when the semantic parsing cannot determine the type of an area. For example, "Fuyong" can be a town or a sub-district. If only "Fuyong" appears in the text and the type cannot be determined based on the context, this sub-parameter is used. |
| location | JSONObject | No | Map POI information, organization, and abstract location. |
The following table lists the nested parameters in coreLocation.
| Sub-parameter | Type | Mandatory | Description |
|---|---|---|---|
| value | string | No | Location information corresponding to the location type. |
| extend | JSONObject | No | Extended location information. |
Identifies person names in the text. The return type is JSONObject with the key name. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameter.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| type | string | Yes | Name type. The options are nr (formal name), nrn (nickname), nrt (title), nrx (other). |
Identifies phone numbers in the text. The return type is JSONObject with the key phoneNum. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| type | number | Yes | Number type. The options are 0 (landline number) and 1 (mobile number). |
| number | string | Yes | Number (excluding the extension number). Mobile number example: 138*****78 Landline number example: 010-1*****78 |
| extNumber | string | No | Extension number. This parameter may be used when the number type is landline. |
Identifies email addresses in the text. The return type is JSONObject, with the key email. The value of the key is empty.
Identifies URLs in the text. The return type is JSONObject, with the key url. The value of the key is empty.
Identifies train numbers in the text. The return type is JSONObject with the key trainNo. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameter.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| sequence | number | Yes | Occurrence frequency of the entity. |
Identifies flight numbers in the text. The return type is JSONObject, with the key flightNo. The value of the key is empty.
Identifies tracking numbers in the text. The return type is JSONObject with the key expressNo. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameter.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| isTailNum | number | Yes | Indicates whether the number is the tail segment of the tracking number. The options are 0 (no) and 1 (yes). |
Identifies ID numbers in the text. The return type is JSONObject with the key idNo. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| number | string | Yes | ID number string |
| sequence | number | Yes | Occurrence frequency of the entity. |
| type | number | Yes | ID document type. The options are 0 (ID card) and 1 (passport). |
| isComplete | number | Yes | Indicates whether the ID number is complete. The value 1 indicates that the ID number is complete and does not contain masked characters such as *. The value 0 indicates that the ID number is incomplete and contains masked characters such as *, for example, 321***********1234. |
Identifies verification codes in the text. The return type is JSONObject with the key verificationCode. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| type | string | Yes | Verification code type (taken directly from the original text, such as verification code or check code). |
| supplier | string | No | Verification code provider. |
Identifies bank card numbers in the text. The return type is JSONObject with the key bankCardNo. The value of the key is a JSONArray, where each element is a JSONObject. The following table lists the parameters.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| number | number | Yes | Digits in the bank card number. |
| sequence | number | Yes | Occurrence frequency of the entity. |
| validDate | string | No | Expiration date of the bank card number. |