Did you know ... | Search Documentation: |
Packs (add-ons) for SWI-Prolog |
Title: | Integer to English word conversions |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.4.2 |
SHA1 sum: | e1b443e9c5d38058e8e7947ae06425135eff8f5c |
Author: | Ebrahim Azarisooreh <ebrahim.azarisooreh@gmail.com> |
Home page: | https://github.com/eazar001/number_to_word |
Download URL: | https://github.com/eazar001/number_to_word/archive/v0.4.2.zip |
No reviews. Create the first review!.
Version | SHA1 | #Downloads | URL |
---|---|---|---|
0.3.0 | c2fecbb44c605e014126aa0cbcc50b7ef47d4d90 | 1 | https://github.com/eazar001/number_to_word/archive/v0.3.0.zip |
0.3.2 | 2271f7486b0f37cfc673d99187bc49493371636f | 1 | https://github.com/eazar001/number_to_word/archive/v0.3.2.zip |
0.3.3 | 1024ef1e0893d50095aea0cd56ac228c0f6d1a23 | 1 | https://github.com/eazar001/number_to_word/archive/v0.3.3.zip |
0.3.4 | c7ede8b293a07e0dbfb3085d1cc6bf16027d24a7 | 1 | https://github.com/eazar001/number_to_word/archive/v0.3.4.zip |
0.4.1 | 6d572dbbef04b0305b42d5ecae997b0a2527d15e | 1 | https://github.com/eazar001/number_to_word/archive/v0.4.1.zip |
0.4.2 | e1b443e9c5d38058e8e7947ae06425135eff8f5c | 32 | https://github.com/eazar001/number_to_word/archive/v0.4.2.zip |
This is a utility pack for converting integers to their English word representations. This was one cool feature that came built in to the Common Lisp implementation. This pack brings this functionality and other related ones to SWI Prolog.
?- number_word([5,5,2,0,1,2,0,0,6], Word). Word = [[five, hundred, fifty, two], million, [twelve], thousand, six] ?- number_word([0,0,6], Word). Word = [six] ?- number_word(Number, [[one], thousand, three, hundred, seventy, two]). Number = [0, 0, 1, 3, 7, 2] ?- number_word(Number, [[one], thousand, X, hundred, seventy, two]). Number = [0, 0, 1, 1, 7, 2], X = one ; Number = [0, 0, 1, 2, 7, 2], X = two ; Number = [0, 0, 1, 3, 7, 2], X = three ; ... etc.
Pack contains 5 files holding a total of 6.1K bytes.