I want to convert words into number like Ninety Nine to 99
Second to 2nd
and Two to 2
etc
Does anybody knows how to do that?
There is no API from Apple for this kind of purpose. Lexicographical analysis is hard even if it is just for a single language. Expressing a number as words might be relatively simple, but getting from words to numbers would require dealing with many special cases.
The brute force approach would be to have a database of all the various possible combinations. A smarter approach would probably analyse the individual words and reason what number that could mean.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With