title: How to read values from numbers written as words?
body: <p>As we all know numbers can be written either in numerics, or called by their names. While there are a lot of examples to be found that convert 123 into one hundred twenty three, I could not find good examples of how to convert it the other way around.</p>
  
  <p>Some of the caveats:</p>
  
  <ol>
  <li>cardinal/nominal or ordinal: "one" and "first"</li>
  <li>common spelling mistakes: "forty"/"fourty"</li>
  <li>hundreds/thousands: 2100 -> "twenty one hundred" and also "two thousand and one hundred"</li>
  <li>separators: "eleven hundred fifty two", but also "elevenhundred fiftytwo" or "eleven-hundred fifty-two" and whatnot</li>
  <li>colloquialisms: "thirty-something"</li>
  <li>fractions: 'one third', 'two fifths'</li>
  <li>common names: 'a dozen', 'half'</li>
  </ol>
  
  <p>And there are probably more caveats possible that are not yet listed.
  Suppose the algorithm needs to be very robust, and even understand spelling mistakes.</p>
  
  <p>What fields/papers/studies/algorithms should I read to learn how to write all this?
  Where is the information?</p>
  
  <blockquote>
    <p>PS: My final parser should actually understand 3 different languages, English, Russian and Hebrew. And maybe at a later stage more languages will be added. Hebrew also has male/female numbers, like "one man" and "one woman" have a different "one" — "ehad" and "ahat". Russian also has some of its own complexities.</p>
  </blockquote>
  
  <p>Google does a great job at this. For example:</p>
  
  <p><a href="http://www.google.com/search?q=two+thousand+and+one+hundred+plus+five+dozen+and+four+fifths+in+decimal" rel="noreferrer">http://www.google.com/search?q=two+thousand+and+one+hundred+plus+five+dozen+and+four+fifths+in+decimal</a></p>
  
  <p>(the reverse is also possible <a href="http://www.google.com/search?q=999999999999+in+english" rel="noreferrer">http://www.google.com/search?q=999999999999+in+english</a>)</p>