Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commas cause incorrect result #76

Open
JmannOSC opened this issue Apr 27, 2023 · 0 comments
Open

Commas cause incorrect result #76

JmannOSC opened this issue Apr 27, 2023 · 0 comments

Comments

@JmannOSC
Copy link

Using python 3.10.4

Commas appear to cause w2n to produce hilariously incorrect results. See attached image.

w2n bug

In the screenshot, "five thousand, six hundred" is returned as 130. Removing the comma results in the expected output.

As a workaround, this issue can be bypassed by stripping commas before calling your library:
input = re.sub(r',','',input)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant