File: README.rdoc

package info (click to toggle)
ruby-numerizer 0.2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 100 kB
  • sloc: ruby: 253; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
= Numerizer

Numerizer is a gem to help with parsing numbers in natural language from strings (ex forty two). It was extracted from the awesome Chronic gem http://github.com/evaryont/chronic.

== Installation

    $ sudo gem sources -a http://gemcutter.org
    $ sudo gem install numerizer

== Usage

    >> require 'numerizer'
    => true
    >> Numerizer.numerize('forty two')
    => "42"
    >> Numerizer.numerize('two and a half')
    => "2.5"
    >> Numerizer.numerize('three quarters')
    => "3/4"
    >> Numerizer.numerize('two and three eighths')
    => "2.375"

== Contributors
Tom Preston-Werner, John Duff