v0.2.0
words2num2 — inverse of num2words2
Convert spoken-form numbers back to numeric values across 100+
locales. Auto-generated release.
Installation
pip install words2num2Usage
from words2num2 import words2num, words2num_sentence
words2num("forty-two") # 42
words2num("one thousand two hundred") # 1200
words2num("quarante-deux", lang="fr") # 42
words2num("zweiundvierzig", lang="de") # 42
words2num_sentence("I bought twenty-three apples and fourteen pears.")
# 'I bought 23 apples and 14 pears.'Full Changelog: v0.1.1...v0.2.0