What's the easiest way in F# (in a functional/recursive style) to, given a number in words, convert it to it's numeric equivalent?
I'm looking at only English for now. E.g:
let parseNumber (s : string) =
match s with
| "One" -> 1
| _ - failwith "Cannot parse"
let result = parseNumber "One Thousand Two Hundred"
// result should be 12000
Is there any way of doing this that doesn't involve a massive look-up table?