Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
137 lines (136 sloc) 4.02 KB
# test straight parsing
- ["one", "1", 3]
- ["one hundred", "100", 3]
- ["one thousand", "1000", 3]
- ["one", "1", 3]
- ["five", "5", 3]
- ["ten", "10", 3]
- ["eleven", "11", 3]
- ["twelve", "12", 3]
- ["thirteen", "13", 3]
- ["fourteen", "14", 3]
- ["fifteen", "15", 3]
- ["sixteen", "16", 3]
- ["seventeen", "17", 3]
- ["eighteen", "18", 3]
- ["nineteen", "19", 3]
- ["twenty", "20", 3]
- ["twenty seven", "27", 3]
- ["thirty-one", "31", 3]
- ["thirty-seven", "37", 3]
- ["forty one", "41", 3]
- ["fourty two", "42", 3]
- ["fifty nine", "59", 3]
- ["a hundred", "100", 3]
- ["one hundred", "100", 3]
- ["one hundred and fifty", "150", 3]
#- ["one fifty", "150", 3]
- ["two-hundred", "200", 3]
- ["5 hundred", "500", 3]
- ["9.9 million", "9900000", 3]
- ["nine hundred and ninety nine", "999", 3]
- ["one thousand", "1000", 3]
- ["twelve hundred", "1200", 3]
- ["one thousand two hundred", "1200", 3]
- ["seventeen thousand", "17000", 3]
- ["twentyone-thousand-four-hundred-and-seventy-three", "21473", 3]
- ["seventy four thousand and two", "74002", 3]
- ["ninety nine thousand nine hundred ninety nine", "99999", 3]
- ["100 thousand", "100000", 3]
- ["two hundred fifty thousand", "250000", 3]
- ["one million", "1000000", 3]
- ["one million two hundred fifty thousand and seven", "1250007", 3]
- ["one billion", "1000000000", 3]
- ["one billion and one", "1000000001", 3]
# fractions
- ["two and a half", "5/2", 3]
- ["one half", "1/2", 3]
# combined double digits
- ["twentyone", "21", 3]
- ["thirtyseven", "37", 3]
# fractions in words
- ["1 quarter", "1/4", 3]
- ["one quarter", "1/4", 3]
- ["a quarter", "1/4", 3]
- ["one eighth", "1/8", 3]
- ["an eighth", "1/8", 3]
- ["three quarters", "3/4", 3]
- ["two fourths", "2/4", 3]
- ["three eighths", "3/8", 3]
# fractional addition
- ["one and a quarter", "5/4", 3]
- ["two and three eighths", "19/8", 3]
- ["three and one ninths", "28/9", 3]
# edges
- ["27 Oct 2006 7:30am", "27 Oct 2006 7:30am", 3]
# multiple slashes should not be evaluated
- ["11/02/200", "11/02/200", 3]
# compatability
- ["1/2", "1/2", 3]
- ["05/06", "05/06", 3]
- ["three and a half hours", "7/2 hours", 3]
# ordinal strings
- ["first", "1st", 3]
- ["second", "second", 3]
- ["third", "3rd", 3]
- ["fifth", "5th", 3]
- ["seventh", "7th", 3]
- ["eighth", "8th", 3]
- ["tenth", "10th", 3]
- ["eleventh", "11th", 3]
- ["twelfth", "12th", 3]
- ["thirteenth", "13th", 3]
- ["sixteenth", "16th", 3]
- ["twentieth", "20th", 3]
- ["twenty-third", "23rd", 3]
- ["thirtieth", "30th", 3]
- ["thirty-first", "31st", 3]
- ["fourtieth", "40th", 3]
- ["fourty ninth", "49th", 3]
- ["fiftieth", "50th", 3]
- ["sixtieth", "60th", 3]
- ["seventieth", "70th", 3]
- ["eightieth", "80th", 3]
- ["ninetieth", "90th", 3]
- ["hundredth", "100th", 3]
- ["thousandth", "1000th", 3]
- ["millionth", "1000000th", 3]
- ["billionth", "1000000000th", 3]
- ["trillionth", "1000000000000th", 3]
- ["first day month two", "1st day month 2", 3]
# word with a number at end
- ["pennyweight", "pennyweight", 3]
# word with a number at beginning
- ["oneself", "oneself", 3]
# multiple numbers
- ["one two three four five", "1 2 3 4 5", 3]
# forms of numbers https://en.wikipedia.org/wiki/Decimal_mark#Examples_of_use
# english-unofficial
- ["1,000,000.00", "1000000", 2]
# english-si
- ["1 000 000.00", "1000000", 2]
# french-si
- ["1 000 000,00", "1000000", 2]
# ireland...
- ["1,000,000·00", "1000000", 2]
# argentina...
- ["1.000.000,00", "1000000", 2]
# india
- ["10,00,000.00", "1000000", 2]
# switzerland
- ["1'000'000.00", "1000000", 2]
# china
- ["100,0000.00", "1000000", 2]
# negatives
- ["negative one hundred", "-100", 3]
- ["negative a thousand", "-1000", 3]
- ["-100 thousand", "-100000", 3]
# chronic test
- ["two million eight hundred and sixty seven thousand five hundred and thirty two seconds from now", "2867532 seconds from now", 3]
# test raw number not followed by a modifier like hundred
# (leave it intact as it may be a "proper" number)
- ["007", "007", 3]
- ["Thu Aug 10 2006", "Thu Aug 10 2006", 3]
- ["0 zero (nought) 10 ten", "0 0 (nought) 10 10", 3]
- ["0.002", "0.002", 3]
- ["1 1/2", "3/2", 3]