10

Gem: Duckling

 3 years ago
source link: https://chrispenner.ca/posts/gem-duckling
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Gem: Duckling

duckling.png
by Chris Penner Feb 21, 2015

Duckling is a very interesting project that I think exemplifies many great design principles. It's a parser written in Clojure that can turn natural language sentences into structured computer readable data. Clojure, if you haven't heard, is a Lisp that runs on Java's virtual machine. Now's a good a time as any to check it out!

Here are some things Duckling can understand:

  • "from 9:30 - 11:00 on Thursday
  • "the day before labor day 2020"
  • "thirty two Celsius"
  • "seventh"

Some of the design decisions that really set Duckling apart:

  • Extensibility: Easily write your own set of rules to make it work for your own purposes.
  • Probabilistic: Duckling doesn't always know what's right, but it'll take its best guess and tell you how sure it is.
  • Data Agnostic: Duckling doesn't make assumptions about what you need, it can be trained to do whatever you like.

Go ahead and check out the docs and give building your own parser a try: Duckling.

Follow me on twitter @chrislpenner to catch new articles as they come!

Hopefully you learned something 🤞! If you did, please consider checking out my book: It teaches the principles of using optics in Haskell and other functional programming languages and takes you all the way from an beginner to wizard in all types of optics! You can get it here. Every sale helps me justify more time writing blog posts like this one and helps me to continue writing educational functional programming content. Cheers!


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK