Announcing accentuateus-0.9 (Haskell implementation of the Accentuate.us API)

2011-01-17

Introduction

As some of you know, I co-created the Accentuate.us project with Kevin Scannell and have been hacking away at various client implementations ever since (including our flagship Firefox client).

Haskell

So, since I have been working on so many implementations of the API, it only seemed natural that I give some attention to my favourite language.

This is my first release on Hackage and it is available at http://hackage.haskell.org/package/accentuateus. I appreciate any feedback you guys have so that I can improve both it and any future code I write.

Code

The source code is available on Spearhead’s GitHub.

Usage

The API implementation boils down to Accentuate.us’ three calls:

  • langs – Accepting an optional locale and mandatory version number (0 if unknown), langs will tell you whether or not you are in sync with the API servers’ current version. If not (supplied version != server version), it will supply a new list of (ISO-639, Language Name) pairs. When possible, we will return the language names localized to the supplied locale.
  • accentuate – This is the magic call in the service: given a language, optional locale (to localize any error messages), and input text, it will use statistics to add diacritics.
  • feedback – The other part of the Accentuate.us service that we really want to make more use of is feedback. Since we use statistics, the diacritic restorations will not always be correct (especially for the more under-resourced languages we support). By supplying a language name and corrected text, we will add it to our training text so that results will improve by user contributions.

Feedback

Again, this is my first upload to Hackage and I’m really excited about it. I appreciate any feedback you guys have. The latest source can be found at https://github.com/michaelschade/hs-accentuateus/blob/master/Text/AccentuateUs.hs.

← all posts

michael schade

I like learning new things. Previously: Kenchi founder, eng & ops teams at Stripe from 2012-2019. Say hi! 🏳️‍🌈