-
Notifications
You must be signed in to change notification settings - Fork 1
Core Entities
Bob Lail edited this page May 17, 2016
·
2 revisions
Entities allow Attentive to match concepts rather than specific words.
Attentive defines the following core entities, but you can easily create your own.
Entity Name | Matches | Returns |
---|---|---|
core.date |
4/20/16 , May 20, 2016 , today , next Wednesday
|
Date |
core.date.month |
Mar , april
|
Fixnum (1–12) |
core.date.wday |
Sunday , mon
|
Fixnum (0–6) |
core.email | [email protected] |
String |
core.number |
42 , 3.14 , 0 , -7.28% , $1,456,001.14
|
Fixnum or BigDecimal
|
Entity Name | Description |
---|---|
core.date.explicit | matches explicit dates like May 6, 2018 or 2018-05-06
|
core.date.partial | matches partial dates like May 6 where the year is assumed |
core.date.partial.future | matches partial dates and fills in the year, assuming the date is in the future |
core.date.partial.past | matches partial dates and fills in the year, assuming the date is in the past |
core.date.relative | matches dates relative to today like tomorrow or next tuesday
|
core.date.relative.future | matches dates relative to today like tomorrow or next tuesday
|
core.date.relative.past | matches dates relative to today like yesterday or last wednesday
|
Entity Name | Description |
---|---|
core.number.positive | matches only positive numbers, not zero |
core.number.negative | matches only negative numbers, not zero |
core.number.integer | matches only integers |
core.number.integer.positive | matches only positive integers, not zero |
core.number.integer.negative | matches only negative integers, not zero |
core.number.float | matches only numbers with a decimal point |
core.number.float.positive | matches only positive numbers with a decimal point, not zero |
core.number.float.negative | matches only negative numbers with a decimal point, not zero |