Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


Deprecated in favor of https://github.com/facebook/duckling

Subscribe to updates I use duckling

Statistics on duckling

Number of watchers on Github 1283
Number of open issues 68
Average time to close an issue 18 days
Main language Clojure
Average time to merge a PR 6 days
Open pull requests 45+
Closed pull requests 20+
Last commit about 3 years ago
Repo Created about 6 years ago
Repo Last Updated over 2 years ago
Size 1.6 MB
Homepage https://duckling....
Organization / Authorwit-ai
Page Updated
Do you use duckling? Leave a review!
View open issues (68)
View duckling activity
View on github
Fresh, new opensource launches πŸš€πŸš€πŸš€
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating duckling for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Deprecation notice

As of May 1st, 2017 we're deprecating this repository in favor of the new Duckling. See our blog post announcement.

Thanks to all the contributors!


Clojars Project

Duckling is a Clojure library that parses text into structured data:

the first Tuesday of October => {:value "2014-10-07T00:00:00.000-07:00"
                                   :grain :day}

You can try it out at https://duckling.wit.ai

See our blog post announcement for more context.

Getting started

To use Duckling in your project, you just need two functions: load! to load the default configuration, and parse to parse a string.

(ns myproject.core
  (:require [duckling.core :as p]))

(p/load!) ;; Load all languages

(p/parse :en$core ;; core configuration for English ; see also :fr$core, :es$core, :zh$core
         "wake me up the last Monday of January 2015 at 6am"
         [:time]) ;; We are interested in :time expressions only ; see also :duration, :temperature, etc.

;; => [{:label :time
;;        :start 15
;;        :end 49
;;        :value {:type "value", :value "2015-01-26T06:00:00.000-02:00", :grain :hour}
;;        :body "last Monday of January 2015 at 6am"}]

See the documentation for more information.

duckling open issues Ask a question     (View All Issues)
  • over 3 years Java API
  • over 3 years French number issue with timezone using sentences with 'et' (translation: 'and')
  • over 3 years Korean support
  • over 3 years duckling is too aggressive in parsing numbers to years
  • over 3 years "afternoon thursday" parsed differently than "thursday afternoon"
  • over 3 years IllegalFieldValueException due to daylight savings time?
  • over 3 years [Portuguese] - keywords "prΓ³ximo" and "que vem" not interpreted
  • almost 4 years Tomorrow after [TIME] example : tomorrow after lunch
  • almost 4 years DateTime Wit understands 26 as 1/1/2026 whereas 26th as 10/26/2016
  • almost 4 years support for recognizing date time entities coming by default and from the user text
  • almost 4 years recognition of multiple date formats
  • almost 4 years Parsing breakfast/lunch/dinner to datetime
  • almost 4 years Incorrectly matches "the end of <time>"
  • about 4 years return date values as either some instance of Date object (joda, raw java etc) or posix date
  • about 4 years [english] do this in 2 minutes
  • about 4 years CI checks failing
  • about 4 years Thai number not found
  • about 4 years Portuguese: "antes das 18", "depois das 15"
  • about 4 years Define a constraint between two datetime entities
  • about 4 years from and to issues
  • about 4 years issue understanding multiple dates
  • about 4 years problem understanding abbreviations
  • about 4 years Date issue
  • over 4 years Loading time and classifier persistence
  • over 4 years Decimals beyond tenth position`
  • over 4 years Defining new corpus/rules
  • over 4 years "on monday afternoon at 230"
  • almost 5 years Wit.ai assumes future date if year not mentioned in query string
  • almost 5 years Support recurrence expressions
  • almost 5 years ArithmeticException occurs when parsing long durations
duckling open pull requests (View All Pulls)
  • add numbers in Portuguese
  • Fix matching of day 0 and month 0
  • Russian numbers (ordinal)
  • fixed #83
  • Portuguese: #98, #101, Holidays
  • Chinese: add 'nth <time> of <time>' rules
  • Italian: add new ordinal number
  • Russian numbers new
  • Irish (not ready to merge)
  • Polish date/time
  • Extend new language - Thai language. But there is some pattern to fix.
  • fix reflection
  • feat(): add some ITA numbers and ordinals
  • Fix language comments :cn$core --> :zh$core
  • Do not print to stderr
  • Fix bug in named integer (0..19)
  • fixed typo
  • Extend new language : Indonesian but need more fix
  • Various fixes in FR
  • typo cn$core ==> zh$core
  • add new Myanmar (my) language resource for numbers.
  • Add swedish language
  • Added slang words for year and quarter
  • Arabic corpus (numbers and ordinals forms)
  • Add french end of month and mid(morning|day|afternoon)
  • pl numbers
  • Added saudi,qatar,kuwaiti currency
  • Fix/de hhmm range
  • Fix/de mm dd
  • Expressions like "ein Hotel" or "ein Angebot" in German are not 1h
  • Turkish support (numbers only)
  • Fixed some italian forms and holidays
  • [FR|EN] Add early in the morning
  • [FR] Fix issue #172 (timezone conflict)
  • RO language
  • Fix DuplicateFormatFlagsException when max-iter-reached exceeded
  • More italian fixes
  • Italian communications + EN url regex improvement
  • [PT] Removing unnecessary prefix in some cycle rules (#161)
  • adding italian new time entities
  • Bug fix: finest grain not used in interval
  • [EN] More natural disambiguation of intervals
  • [PT] Adds contractions of preposition 'desse' and 'deste' (of this) as current moment
  • Updated Swedish time rules
  • Added dutch language to the time elements and modified the time eleme…
duckling list of languages used
Other projects in Clojure