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

German: Numbers are falsely being added up #100

Closed
qp450 opened this issue Nov 20, 2023 · 0 comments · Fixed by #102
Closed

German: Numbers are falsely being added up #100

qp450 opened this issue Nov 20, 2023 · 0 comments · Fixed by #102

Comments

@qp450
Copy link

qp450 commented Nov 20, 2023

Thank you for this package, it's very useful!

I am using it for German and would like to report a bug: When inputting "vier fünfhundert", I expect "4 500", but get "504".
This seems to be happening whenever there is a number from 1-99 followed by a hundred with a multiplier (einhundert-neunhundert), for example "dreizehn siebenhundert" -> "713" or "achtundachtzig sechshundert" -> "688" (expected would be "13 700" and "88 600"). I have identified that this behavior stems from the parse() function in the WordStreamValueParserGerman() class. The three parts (for example "vier", "fünf", "hundert") are added to a list, then "fünf" and "hundert" are resolved to "500", but then "vier" is still in the list and gets added to "500".

My python version is 3.10.12.

Would it be possible to fix this or do you have an idea where exactly or why this bug occurs?
Thank you very much!

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

Successfully merging a pull request may close this issue.

1 participant