duckling.corpus
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
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
quantity
(quantity value unit & [product])
Create a quantity condition
read-corpus
(read-corpus new-file)
Read corpus from a file
Args:
new-file (string): file path
Returns:
(map): a Corpus map {:context {}, :tests []}
temperature
(temperature value' & [unit' precision'])
this-ns
macro
(this-ns)
Total hack to get ns of this file at compile time
volume
(volume value unit & [normalized])
Create a volume condition