Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (37 sloc) 1.35 KB


Baberl is a collection of features to make working with character sets and language easier:

  • Character set conversions via iconv
  • Robust pluralization support for English nouns
  • Basic pluralization support for English verbs
  • Ordinal conversion for numbers
  • Number-to-English (ordinate) conversion for whole numbers up to 21 digits


Using it is simple.

1> application:start(baberl).
2> baberl:convert("", "UTF-8", <<"foo">>).
3> baberl:convert("UTF-8", "ASCII//translit//IGNORE", unicode:characters_to_binary("fooÔ")).
4> baberl_plurals:pluralize(noun, "cat").
5> baberl_plurals:pluralize(noun, "half").
6> baberl_plurals:pluralize(verb, "am").
7> baberl_plurals:pluralize(verb, "ran").
8> baberl_numbers:ordinal(123).
9> baberl_numbers:ordinate(1001).
"one thousand one"
10> baberl_numbers:ordinate(123456789).
"one hundred twenty three million four hundred fifty six thousand seven hundred eighty nine"


The file is also included for OTP distribution.


Copyright (c) 2009 Electronic Arts, Inc.

This library was developed by Electronic Arts and is open source under the MIT license.


Kevin A. Smith
Nick Gerakines