This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
baberl /
| name | age | message | |
|---|---|---|---|
| |
Makefile.in | Tue Aug 04 10:31:04 -0700 2009 | |
| |
README.markdown | Tue Aug 04 10:38:01 -0700 2009 | |
| |
baberl_generator.escript | Mon Jul 20 06:47:34 -0700 2009 | |
| |
baberl_plurals.escript | Mon Jul 27 08:41:00 -0700 2009 | |
| |
baberl_stress.escript | Mon Jul 20 06:47:34 -0700 2009 | |
| |
c/ | Tue Jul 21 12:46:54 -0700 2009 | |
| |
configure | Tue Jul 21 12:32:03 -0700 2009 | |
| |
configure.in | Mon Jul 20 06:47:34 -0700 2009 | |
| |
erl/ | Wed Aug 26 17:18:30 -0700 2009 | |
| |
priv/ | Tue Aug 04 10:31:04 -0700 2009 | |
| |
t/ | Tue Aug 04 10:31:04 -0700 2009 |
README.markdown
About
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
Usage
Using it is simple.
1> application:start(baberl).
ok
2> baberl:convert("", "UTF-8", <<"foo">>).
{ok,<<"foo">>
3> baberl:convert("UTF-8", "ASCII//translit//IGNORE", unicode:characters_to_binary("fooÔ")).
{ok,<<"foo^O">>}
4> baberl_plurals:pluralize(noun, "cat").
"cats"
5> baberl_plurals:pluralize(noun, "half").
"halves"
6> baberl_plurals:pluralize(verb, "am").
"are"
7> baberl_plurals:pluralize(verb, "ran").
"ran"
8> baberl_numbers:ordinal(123).
"123rd"
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"
Hurray!
The baberl.app file is also included for OTP distribution.
License
Copyright (c) 2009 Electronic Arts, Inc.
This library was developed by Electronic Arts and is open source under the MIT license.
Credits
Kevin A. Smith kevin@hypotheticalabs.com
Nick Gerakines nick@gerakines.net







