Clj-duckling 0.8.1
A Clojure library that parses text into structured data.
Installation
To install, add the following dependency to your project or build file:
[dpom/clj-duckling "0.8.1"]
Namespaces
clj-duckling.core
The main unit, contains global tests and examples of library use
Public variables and functions:
clj-duckling.dims.time.prod
Public variables and functions:
- compose-money
- compose-numbers
- cycle-last-of
- cycle-n
- cycle-n-not-immediate
- cycle-nth
- cycle-nth-after
- cycle-nth-after-not-immediate
- day-of-month
- day-of-week
- dim
- duration
- duration-after
- duration-ago
- duration-before
- hour
- hour-minute
- hour-minute-second
- hour-relativemin
- in-duration
- integer
- intersect
- interval
- minute
- month
- month-day
- parse-dmy
- parse-number-fr
- pred-last-of
- pred-nth
- pred-nth-after
- pred-nth-not-immediate
- sec
- set-meridiem
- set-timezone
- ti
- year
clj-duckling.util.corpus
Checker functions used in corpus files. They return *nil* when OK, or [expected actual] when not OK
clj-duckling.util.engine
This component parses a phrase and extracts information based on rules. The two main phases are matching and production. 1. rules are transformed into objets via rules macro 2. rules are (recursively) matched based on theirs pattern vectors. 3. tokens containing final info are produced using their production rules
Public variables and functions:
clj-duckling.util.helpers
This namespace contains the common helpers used in rules
clj-duckling.util.time
Public variables and functions:
- ->fields
- add-to-period
- before?
- day
- day-of-week
- days-in-month
- days-in-month-test
- end
- grain-order
- hour
- intersect
- interval
- interval-start-end
- minus
- minute
- month
- negative-period
- negative-period-test
- now
- period
- period->duration
- period-fields
- period-grain
- period-grain-test
- plus
- plus-period
- plus-period-test
- plus-test
- round
- round-test
- sec
- start-before-the-end-of?
- starting-at-the-end-of
- t
- test-today
- time-fields
- valid?
- year
- zone