Skip to main content

Module cardinal

Module cardinal 

Source
Expand description

Cardinal number tagger.

Converts spoken number words to digits:

  • “one” → “1”
  • “twenty one” → “21”
  • “one hundred twenty three” → “123”
  • “one thousand two hundred thirty four” → “1234”
  • “minus sixty” → “-60”

Functions§

parse
Parse spoken cardinal number to string representation.
words_to_number
Convert spoken number words to integer.