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

alpha2didgit don't work with "one day" #42

Open
Krozark opened this issue Jan 8, 2021 · 3 comments
Open

alpha2didgit don't work with "one day" #42

Krozark opened this issue Jan 8, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@Krozark
Copy link

Krozark commented Jan 8, 2021

The lib is pretty cool, but I find a bug with a particular sentence:

alpha2digit("one day", "en")
'one day

Expected :
"1 day"

The same is true in french (initial test in fact)

@rtxm
Copy link
Collaborator

rtxm commented Jan 8, 2021

The current algorithm is unable to make the difference between the number ("one day") and the pronoun ("the one, each one, another one, this one, etc…").
In French it can't do the difference between "un" (number) = "one" and "un" (article) = "a" or "un" pronoun ("j'en veux un").
So, for such words, we don't replace by default, except if another number is next (see unit tests).

@Krozark
Copy link
Author

Krozark commented Jan 8, 2021

Ok, that make sens.
Thanks for you reply. Maybe an option to force the replace for those cases could be added

@rtxm
Copy link
Collaborator

rtxm commented Jan 8, 2021

Yes. Let's tag this as feature request then.

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

No branches or pull requests

2 participants