ShailChoksi / text2digits

Converts text such as "twenty three" to number/digit "23" in any sentence
MIT License
66 stars 22 forks source link

"6, 2020" is converted to "12120" #43

Open winterblues opened 3 years ago

winterblues commented 3 years ago

text = "6, 2020" t2d = text2digits.Text2Digits(convert_ordinals=True, add_ordinal_ending=False) result = t2d.convert(text)

"12120"

I would have expected that the string is unchanged.

version used: 0.1.0

winterblues commented 3 years ago

"6, 2021" --> "6, 2021" (as expected) "6, 20" --> "6, 20" (as expected)

but:

"6, 1010" --> "6060"