Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eccstartup/numbertotext
number to text project for haskell
https://github.com/eccstartup/numbertotext
Last synced: 6 days ago
JSON representation
number to text project for haskell
- Host: GitHub
- URL: https://github.com/eccstartup/numbertotext
- Owner: eccstartup
- License: bsd-3-clause
- Created: 2013-09-18T14:28:49.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-22T14:04:57.000Z (over 11 years ago)
- Last Synced: 2023-03-28T23:38:29.286Z (almost 2 years ago)
- Language: Haskell
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A program converts a number to a String
=======================================Text.New.Speak.hs
-----------------
say :: String -> IO System.Process.Internals.ProcessHandle
>say "hello world"NOTE:it works for mac os x
Text.New.NumberToText.hs
---------------------
numberToText :: Integer -> String
>numberToText 123>"one hundred and twenty-three"
digitToText :: String -> String
>digitToText "1.2312341231231232132131232132">"one point two three one two three four one two three one two three one two three two one three two one three one two three two one three two"
[This is what I refer to.](http://www.mrob.com/pub/math/largenum.html)
--------------
[A new and detailed link](http://www.isthe.com/chongo/tech/math/number/howhigh.html)--------------
TODO:
I don't know how big number I can manipulate.
There is some problem when it reaches "10^3006".Updated:
========================
========================
Install:
```
git clone https://github.com/eccstartup/numberToText.git
cd numberToText
cabal configure
cabal build
cabal install
```
--------------------
Useage:
```
>import Text.New.NumberToText
>numberToEnglish "1234567890"
"one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety">digitToEnglish "1234567890.123456789"
"one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety point one two three four five six seven eight nine">import Text.New.Speak
say $ numberToEnglish "12345678901234567890"
--This works for mac os x!
--You can hear it!
```
------------------------
Useful link:
[How high can you count?](http://www.isthe.com/chongo/tech/math/number/howhigh.html)