Word | - is a list of English words correspond to an integer. Every number
that represents a magnitude that increases by the order of 10^3, is encased
in its own list.
In example,
?- 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.
|