clj-duckling.util.corpus
Checker functions used in corpus files. They return *nil* when OK, or [expected actual] when not OK
budget
(budget value' & [unit' level'])
Create a budget condition
datetime
(datetime & args)
Creates a datetime checker function to check if the token is valid
datetime-interval
(datetime-interval from to)
Creates a datetime interval checker function
distance
(distance value' & [unit' normalized' precision'])
Create a distance condition
gender
(gender gen)
Create a gender condition
integer
(integer & [min max & predicates])
Return a func (duckling pattern) checking that dim=number and integer=true,
optional range (inclusive), and additional preds
money
(money value' & [unit' precision'])
Create a amount-of-money condition
number
(number value)
check if the token is a number equal to value.
If value is integer, it also checks :integer true
order
(order val)
Create an order condition
quantity
(quantity value unit & [product])
Create a quantity condition
temperature
(temperature value' & [unit' precision'])
volume
(volume value unit & [normalized])
Create a volume condition