explaingit

botpress/duckling

Analysis updated 2026-07-19 · repo last pushed 2019-03-18

2HaskellAudience · developerComplexity · 3/5DormantSetup · moderate

TLDR

Duckling is a tool that recognizes phrases like dates, times, distances, and amounts in everyday text and converts them into structured data software can actually use.

Mindmap

mindmap
  root((repo))
    What it does
      Parses natural language
      Extracts dates and times
      Handles units and currency
    How it works
      Composable rules
      Testable patterns
      Reliable Haskell code
    Use cases
      Chatbot scheduling
      Virtual assistants
      Text parsing pipelines
    Tech stack
      Haskell
    Audience
      Developers
      Bot builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a chatbot that understands when users type things like 'next Tuesday at 3pm' and turns it into a calendar event.

USE CASE 2

Create a virtual assistant that parses durations, distances, and currency amounts from free-text messages.

USE CASE 3

Add natural language date and time parsing to a scheduling or booking app backend.

USE CASE 4

Extract structured data like email addresses or physical quantities from messy user input.

What is it built with?

Haskell

How does it compare?

botpress/ducklingpsibi/odbc-issue-49tchayen/lambda-chat
Stars213
LanguageHaskellHaskellHaskell
Last pushed2019-03-182022-04-262018-03-18
MaintenanceDormantDormantDormant
Setup difficultymoderatemoderatemoderate
Complexity3/51/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Written in Haskell, which requires familiarity with the Haskell toolchain and environment setup.

No license information was provided in the explanation, so it is unclear what permissions you have.

In plain English

Duckling is a tool that helps software understand pieces of natural language text. When someone types "next Tuesday at 3pm" or "five kilometers," a computer sees only a string of characters. This project provides a system for identifying those phrases and converting them into structured data a calendar app or tracking tool can actually use. At a high level, it works by applying a set of composable, testable rules to incoming text. Instead of hard-coding logic to recognize every possible way someone might write a time or a distance, you build up small rules that can be combined. You string those rules together to evaluate whether an input string matches a pattern, then extract the meaningful information from it. The primary use case is chatbots and virtual assistants. If you are building a scheduling assistant, it needs to parse dates, times, and durations from free-text user messages. Someone might write "in a week," "tomorrow afternoon," or "July 4th." A developer would use this to recognize all those variations and turn them into standard dates that a backend database can process. The same logic applies to currency amounts, email addresses, or physical quantities. Notably, the project is written in Haskell, a programming language that enforces strict rules around data types and logic. That choice makes the system reliable and mathematically predictable when processing potentially messy text. The README itself doesn't go into further detail about specific setup or advanced features, but the core concept centers on providing a dependable foundation for language parsing.

Copy-paste prompts

Prompt 1
I want to use Duckling to parse user messages in my chatbot. How do I integrate it so that phrases like 'tomorrow afternoon' or 'in a week' get converted into standard date objects I can store in my database?
Prompt 2
Help me set up Duckling to extract multiple entity types from free text, dates, times, currency amounts, and distances. How do I configure which dimensions to parse and what the output format looks like?
Prompt 3
I am building a scheduling assistant and need to handle phrases like 'July 4th', 'next Monday at noon', and 'two hours from now'. How would Duckling recognize these variations and return structured results?
Prompt 4
Can you explain how Duckling's composable rules work and how I would add a custom rule to recognize a new pattern in text input?

Frequently asked questions

What is duckling?

Duckling is a tool that recognizes phrases like dates, times, distances, and amounts in everyday text and converts them into structured data software can actually use.

What language is duckling written in?

Mainly Haskell. The stack also includes Haskell.

Is duckling actively maintained?

Dormant — no commits in 2+ years (last push 2019-03-18).

What license does duckling use?

No license information was provided in the explanation, so it is unclear what permissions you have.

How hard is duckling to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is duckling for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.