ok
CHOOSE YOUR LANGUAGE

System Concepts

  • An Overview
  • System Entities
  • System Phrases

An Overview


With the aim of making app development as easy as possible, the DS pre-defines a set of concepts we called system concepts. These concepts are similar to other normal concepts except they are so frequently referenced that it is definitely a good idea to define them in advance in order for you to effortlessly reference them instead of writing them yourself.

A system concept is either a system entity or a system phrase. Some examples of system entities are "color"---which could be greenblue, or red---or "number"---which could be a 19, or 100. An example of our predefined system phrases is "base.phrase.greeting.niceToMeetYou"---which could cover the phrases,

nice to meet you
great to meet you
good to see you
, etc.

You get the idea.

One can reference a system entity or system phrase simply by typing an @ while defining a sentence under the intents tab.

System Entities


Fig. 1 shows you how to add the system entity---base.generic.number, which represents any number.

 

Fig. 1. various system entities ready to be chosen.

In Table 1 to 5 below, we list some system entities available in our system. Their coverage (instances a system entity can cover), along with their descriptions, is also included.

Table 1. generic system entities defined in our system

Entity name Description Coverage(En) Coverage(zh)
base.generic.any Matches any non-empty input Any String Any String
base.generic.contactPeople Contacts "Tom", "Tomas", etc. 阿德","林阿德", etc.
base.generic.color a color blue, yellow, etc. 藍色 黃色, etc.
base.generic.number a number One, two , three four, ... or 1,2,3,4,... Note: one thousand and two hundreds = one two zero zero=1200
e.g., 一,二,三,四,... 或 1,2,3,4,... Note. 一千兩百 = 一千二 = 1200
base.generic.ordinal an ordinal number If there is a minus sign with a number, it means the last number ordinal. ex: The first one, First one, First, The first Note. The first = 1

倒數第一個 ->

{“word”: ”倒數第一個”, “ordinal”: “-1”}

base.generic.family family member "Father" , "Mother" , "GrandFather" , "Little Girl" , "Daddy" , "Dad" , "Mom" ,"Mum" , "Mommy" , "MummyI" , "Mama"

"爺爺" , "爸爸" , "媽媽" , "哥哥" , "姊姊" , "弟弟" , "妹妹"

 

 

 

   

 

 

 

 

 

 

 

 

 

Table 2. Geo system entities defined in our system

Entity name Description Coverage (En) Coverage (zh)
base.geo.city Cities Paris, London, Taipei, Kaohsiung 巴黎,倫敦,高雄,etc.
base.geo.country Countries France, England, Taiwan, etc. 法國, 英國, 台灣, etc.

 

 

 

 

Table 3. system entities related to dates, time, etc.
Entity name Description Coverage (En) Coverage (zh)
base.time.timetag.period.time Matches a period of date and time Morning, evening, night, afternoon, noon, midnight, tonight 清晨、凌晨、早上、上午、中午, 深夜, 從X點到Y點從[時段1]到[時段2] E.g., 從早上8點到下午3點 E.g., 從早上到下午
base.time.timetag.period.date Matches a period of dates January, February, March, April, may, June, July, august, September, October, November, December 從星期X到星期Y, 從X號到Y號, 從X月到Y月 E.g., 從六月8號到八月3號 E.g., 2016年
base.time.timetag.datetime.date Matches a date The day before yesterday, yesterday, today, tomorrow, the day after tomorrow, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday 前天、昨天、今天、明天、後天,星期(一日),禮拜(一日),週(一~日),X月Y號,X月Y日
base.time.timetag.datetime.time Matches both an absolute datetime and a relative datetime X o’clock, X a.m., X p.m. X點,X點Y分,X點Y分Z秒
base.time.countdown.date Matches a duration of a date X years, Y months, Z days, Y months Z days, X years Y months, X years Y months X days X年, Y個月, Z天, X年Y個月, Y個月Z天, X年Y個月Z天
base.time.countdown.time Matches a duration of time X hours, Y minutes, Z seconds, Y minutes Z seconds, X hours Y minutes, X hours Y minutes Z seconds X小時, Y分鐘, Z秒(鐘), X小時Y分, Y分Z秒, X小時Y分鐘Z秒
base.time.frequency Matches time frequency not available 每A秒,每B分鐘,每C小時,每D天,每E個星期(禮拜),每F個月,每G年

 

 

 

 

 

 

 

 

 

 

Table 4. unit system entities defined in our system

Entity name Description Coverage (En) Coverage (zh)
base.unit.area Matches a number and a unit of an area covered Unit: hectare(s),acre(s),cm²,m², etc.; covered utterance: 1 square meter 支援單位: 1. 坪,英畝,公畝,公頃 2. 平方(吋,英寸,英吋,英里,英哩,英尺,英呎,公里,公尺,公分,公厘,釐米,厘米) 支援講法: 1平方公尺
base.unit.weight Matches a number and a unit of weight covered unit: long ton,metric ton; covered utterance: 1 gram, 2 grams 支援單位: 公斤,公克, etc. 支援講法: 1公斤
base.unit.length Matches a number and a unit of length covered unit: inch(es), etc.; covered utterance: 1 mile 支援單位: 吋,英吋, etc. 支援講法: 1公分
base.unit.speed Matches a number and a unit of speed covered utterance: 20 miles per hour 支援格式: 每(小時/分鐘/秒)(吋/英吋/公里/公尺/公分/公厘) 支援講法: 每小時1公尺
base.unit.percent
Matches a number and a percent sign covered utterance: Twenty percent 支援講法: 一百 Percent, 100趴
base.unit.volume Matches a number and a unit of volume covered format: cubic(centimeter(s),centimetre(s),meter(s),metre(s)), etc.; covered utterance: Two cubic meters 支援格式: 升/公升/毫升/英式(加侖/品脫/夸脫)/加侖/品脫/夸脫/立方(公分/釐米/厘米/公尺/米/尺) 支援講法: 一公升
base.unit.currency Matches a number and a monetary unit overed format: malaysian ringgit/japanese yen/dollar(s); covered utterance: Two dollars 支援格式: 台幣/新台幣/美元/美金/日幣/日圓/日元/韓元/韓幣/港幣/港元/澳幣/ 支援講法: 100元
base.unit.temp Matches a number and a unit of temperature covered format: Celsius , fahrenheit; covered utterance: 5 degrees Celsius 支援格式: 攝氏,華氏 支援講法: 攝氏五度,華氏零下5度
base.unit.storage Matches a unit of digital information covered format:kilobit(s),kilobyte(s),megabit(s),megabyte(s), etc.; covered utterance: 1 kilobit Not available

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Table 5. domain system entities defined in our system
Entity name Description Coverage (En) Coverage (zh)
domain.music.singer Matches a singer Adam Levine, etc. 蔡依林,etc.
domain.music.song Matches a song She will be loved, etc. 大藝術家, etc.

 

 

 

 

 

 

 

System Phrases

Details on the system phrases we provide will be listed soon.

 

JSON Format


1.1Generic System Entity

Entity name

Description

Examples

Mapping

base.generic.any

Matches any non-empty input

I like to @@{base. generic.any}

anything

base.generic.contactPeople

Contact people

Call the @@{base.generic.contactPeople}

Will store by user in runtime DM DB

base.generic.color

Colors

I like @@{base.generic.color}

紅色 => base.generic.color

base.generic.url

url

Please go to @@{base.generic.url}

http://aaa.test.com=> base.generic.url

base.generic.address

Address

@@{base.generic. address}

 

base.generic.email

Email

@@{base.generic.email}

aaa@test.com=> base.generic.email

base.generic.phonenumber

Phone number

@@{base.generic.phonenumber}

 022123311 => base.generic.phonenumber

base.generic.number

A number

@@{base.generic.number}

5 =>base.generic.number

base.generic.ordinal

Ordinal Number

@@{base.generic.ordinal}

第3個

-> {"word":"第3個","ordinal":"3"}

base.generic.contactPeople

 

contactPeople

@@{base.generic.contactPeople}

 

base.generic.family

 

Common use for family member

@@{ base.generic.family}

 

1.2Geo System Entity

Entity name

 

Description

Examples

 

mapping

base.geo.city

Cities

你知道@@{base.geo.city}哪裡好玩嗎

台北=> base.geo.city

base.geo.country

Countries

你去過@@{base.geo.country}嗎

台灣

=>base.geo.country

1.3Time System Entity

Entity name

Description

Examples

mapping

base.time.timetag.period.time

Matches a period of datetime

@@{base.time.timetag.period.time}會不會下雨

今天晚上

{"timeEntity":"base.time.timetag.period.time","startIndex":0,"expression":"2016-01-26 17:xx:xx/2016-01-26 23:xx:xx","level":"模糊時間","endIndex":4,"RangeFrom":"Tue Jan 26 17:00:00 CST 2016","RangeTo":"Tue Jan 26 23:59:59 CST 2016","message":"今天晚上"}

 

 

· 早上:04:00-12:00

· 上午:00:00-12:00

· 中午:11:00-13:00

· 下午:12:00-24:00

· 傍晚:16:00-20:00

· 黃昏:16:00-20:00

· 晚上:18:00-03:00

· 深夜、半夜:23:00-04:00

· 凌晨:00:00-06:00

 

 

 

base.time.timetag.period.date

Matches a period of date

@@{base.time.timetag.period.date}的運勢好不好

下個月 -=>

{"timeEntity":"base.time.timetag.period.date","startIndex":0,"expression":"2016-2-1/2016-2-29","level":"模糊日期","endIndex":3,"RangeFrom":"Mon Feb 01 00:00:00 CST 2016","RangeTo":"Mon Feb 29 23:59:59 CST 2016","message":"下個月","type":"period"}

 

base.time.timetag.datetime.date

Matches date

我的生日是@@{base.time.timetag.datetime.date}

明天

{"timeEntity":"base.time.timetag.datetime.date","startIndex":0,"expression":"2016-01-21 xx:xx:xx","level":"日期","endIndex":2,"normalizedDate":"Thu Jan 21 00:00:00 CST 2016","message":"明天","type":"datetime"}

 

base.time.timetag.datetime.time

Matches Both absolute datetime and relative datetime.

@@{base.time.timetag.datetime.time}叫我起床

下個禮拜五晚上七點

{"timeEntity":"base.time.timetag.datetime.date","startIndex":2,"expression":"2016-01-22 19:xx:xx","level":"時間","endIndex":9,"normalizedDate":"Fri Jan 22 19:00:00 CST 2016","message":"星期5晚上7點","type":"datetime"}

 

base.time.countdown.date

Matches date length

@@{base.time.countdown.date}後提醒我要訂車票

三天

{"timeEntity":"base.time.timetag .countdown.date","startIndex":0,"expression":"3 day","level":"日期長度","endIndex":2,"message":"3天","type":"length","DLengthDay":3}

 

base.time.countdown.time

Matches time length

倒數計時@@{base.time.countdown.time}

五分鐘

{"timeEntity":"base.time.timetag .countdown.time","startIndex":0,"TLengthMinute":5,"expression":"5 minute","level":"時間長度","endIndex":3,"message":"5分鐘","type":"length"}

 

base.time.frequency

Matches time frequency

@@{base.time.frequency.time}叫我一下

每小時

{"timeEntity":"base.time.frequency.time","startIndex":0,"expression":"frequency-hour","level":"頻率時間","endIndex":3,"message":"每小時"}

Expression會有下面這幾種

frequency-year

frequency-month

frequency-week

frequency-date

frequency-hour

frequency-min

frequency-sec

frequency-date

1.4Unit System Entity

Entity name

description

examples

Mapping and Result value format

base.unit.area

Matches a number plus units of area

這房子大概@@{base.unit.area}

30.5-40坪 ->

{"unit":"坪","lowerbound":"30.5","upperbound":"40","word":"30.5-40坪"}

30.8 sq fts ->

{"amount":"30.8","unit":"sq fts","word":"30.8 sq fts"}

base.unit.weight

Matches a number plus units of weight

我的體重是@@{base.unit.weight}

3公斤 ->

{"amount":"3","unit":"公斤","word":"3公斤"

1至3公克 ->

{"unit":"公克","lowerbound":"1","upperbound":"3","word":"1至3公克"}

base.unit.length

Matches a number plus units of length

我的身高是@@{base.unit.length}

5公尺 ->

{"amount":"5","unit":"公尺","word":"5公尺","startpos":0,"endpos":3}

3.5-5 miles  ->

{"unit":"miles","lowerbound":"3.5","upperbound":"5","word":"3.5-5 miles"}    

base.unit.speed

Matches a number plus units of speed

速度是@@{base.unit.speed}

每小時5.4公里 ->

{"unit":"小時","amount":"5.4","unit2":"公里","word":"每小時5.4公里"}

3 miles per hour->

{"amount":"3","unit":"hour","unit2":"miles","word":"3 miles per hour"}

 

base.unit.percent

Matches a number plus units of percent

目前進度為@@{base.unit.percent}

20.50% ->

{"amount":"20.5","unit":"%","word":"20.5%"}

base.unit.volume

Matches a number plus units of volume

這個杯子的容量是@@{base.unit.volume}

5-7公升 ->

{"unit":"公升","lowerbound":"5","upperbound":"7","word":"5-7公升"}

30.5-40 liters ->

{"unit":"liters","lowerbound":"30.5","upperbound":"40","word":"30.5-40 liters"}

base.unit.currency

Matches a number plus units of currency

你用@@{base.unit.currency}買這個

1千美元->

{"amount":"1","unit":"千美元","word":"1千美元"}

300 to 500 euros ->

{"unit":"euros","lowerbound":"300","upperbound":"500","word":"300 to 500 euros"}

base.unit.temp

Matches a number plus units of temperature

今天溫度為@@{base.unit.temp}

攝氏50度 ->

{"amount":"50","unit":"攝氏","word":"攝氏50度"}

攝氏零下5度->

{"amount":"-5","unit":"攝氏","word":"攝氏-5度"}

base.unit.storage

Matches a number plus units of storage

電腦記憶體是@@{base.unit.storage}

8gb ->

{"amount":"8","unit":"gb","word":"8gb"}

Go To Top