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

[GER] ein, einen, einem not converted properly #85

Closed
agademic opened this issue Jan 6, 2023 · 1 comment
Closed

[GER] ein, einen, einem not converted properly #85

agademic opened this issue Jan 6, 2023 · 1 comment

Comments

@agademic
Copy link

agademic commented Jan 6, 2023

Hi!
First of all, thank you for your great library! In general everything works really well.
But here is a case where written numbers are not converted properly in German, especially numbers indicating a "one". Here are some examples:

alpha2digit("einem Getränk", "de") - > "einem Getränk"
alpha2digit("ein Getränk", "de") - > "ein Getränk"
alpha2digit("eine Getränk", "de") - > "eine Getränk"
alpha2digit("einen Getränk", "de") - > "einen Getränk"
alpha2digit("eines Getränk", "de") - > "eines Getränk"
--> Expected in all cases: "1 Getränk"

What works is alpha2digit("eins Getränk", "de") - > "1 Getränk" but that's the only case.

I know German (grammatical) cases are somewhat nasty. In English just say "one drink" in every (grammatical) case. But this is something which would be really awesome if your library could handle them. Or am I missing something?

Anyway, thank you for any tips!

@rtxm
Copy link
Collaborator

rtxm commented Jan 30, 2023

In all the languages we support, the indefinite article is not considered a ordinal by alpha2digit.

alpha2digit("un chien", "fr")
"un chien"
alpha2digit("a dog", "en")
"a dog"
# and even
alpha2digit("one dog", "en")
"one dog"
# but
alpha2digit("one two three", "en")
"1 2 3"

The purpose of the provided alpha2digit function is to make text easier to read for humans.
Follow #42 for a feature extension to "force" conversion of articles.

@rtxm rtxm closed this as completed Jan 30, 2023
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

2 participants