facebook/duckling

Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 18 minutes ago
Added to GitGenius on August 8th, 2026
Created on March 2nd, 2017
Open Issues & Pull Requests: 140 (+0)
Number of forks: 740
Total Stargazers: 4,301 (+0)
Total Subscribers: 74 (+0)

Issue Activity (beta)

Open issues: 12
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 1,059 days
Stale 30+ days: 12
Stale 90+ days: 12

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (1)
  • enhancement (1)
  • help wanted (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 25.1 hours
Mean response time: 65.0 days
90th percentile: 134.0 days
Tracked items: 10

Most active contributors

Detailed Description

Duckling is a Haskell library developed by Facebook that parses natural language text into structured data. It functions as a language engine and tooling framework for expressing, testing, and evaluating composable language rules applied to input strings. The library is designed to extract meaningful entities and measurements from unstructured text and convert them into machine-readable formats.

The core functionality of Duckling centers on dimension-based parsing, where each dimension represents a specific type of entity or measurement that can be extracted from text. Supported dimensions include AmountOfMoney, CreditCardNumber, Distance, Duration, Email, Numeral, Ordinal, PhoneNumber, Quantity, Temperature, Time, Url, and Volume. For example, the library can parse "42€" into a structured value of 42 EUR, or convert "today at 9am" into an ISO-formatted timestamp with grain information. Custom dimensions can also be defined for domain-specific applications.

Duckling operates as an HTTP server that accepts text input and returns parsed results in JSON format. The library supports multiple languages, though dimension coverage varies by language. Users can specify which dimensions to enable via parameters, allowing flexible configuration for different use cases. The project provides an example application demonstrating integration patterns, and Facebook also offers Duckling's functionality through wit.ai's built-in entities for users who prefer not to run their own Haskell server.

The repository is written in Haskell and requires a Haskell environment using stack for compilation. Setup involves installing PCRE development headers on Linux and MacOS systems. The project includes comprehensive documentation on extending Duckling's capabilities, including procedures for adding support for new dimensions in existing languages, implementing entirely new languages following ISO-639-1 standards, and defining locale-specific rules using ISO3166 alpha2 country codes.

According to GitGenius activity tracking, the repository shows median issue and pull request response latency of 25.1 hours with a mean of 1559.6 hours, indicating variable response times across different issues. The most active contributor tracked is patapizza with 9 events, followed by abolfazlakbary with 4 events and hyunsooda with 3 events. Recent activity focuses on enhancements, bug fixes, and help-wanted items. The repository shares contributors with other projects including ericlbuehler/mistral.rs, vllm-project/vllm, and 3b1b/manim, suggesting cross-pollination within the broader open-source ecosystem.

Extending Duckling typically requires updating four files per dimension-language combination: Rules.hs for pattern matching logic, Corpus.hs for test examples, language-specific dimension files, and language rule aggregation files. The framework uses patterns for character-level regex matching and concept-level predicate matching on tokens, with productions defined as arbitrary functions that transform token lists into new tokens. The project includes debugging tools through the Duckling.Debug module and is distributed under a BSD license.

duckling
by
facebookfacebook/duckling

Repository Details

Fetching additional details & charts...