-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support ordinals #6
Comments
Hi @noviluni so I had begin working on the support for ordinal numbers. The best approach I believe is to create similar structure like the cardinal numbers. One direction was to somehow extend the cardinal numbers to handle ordinal too. (storing additional suffix only , example
So, thus I plan to update the data files with the following proposed structure. I am thinking of adding the tokens for negative and decimal numbers too for future features. (For English negative_tokens might be 'minus', 'negative' and decimal_tokens would be 'point', 'dot' )
|
Hi @arnavkapoor! It looks good! However, I'm not 100% sure of adding negative and decimal tokens right now for two reasons:
Does this make sense? About the naming, it's ok :). Maybe we could change |
Currently ordinal number support exists for only English language. #31 (review) . There needs to be changes to incorporate other languages. One way could be updating the |
I open this ticket to track the ordinal's feature.
From my understanding, what we should achieve is:
However, as we support other words in the sentence, we should probably take care of some ambiguous words. I would take special care to "second". I think it should be translated to "2nd" only when it's not preceded by:
1
(example:"1 second"
)one
(example:"one second"
)a
(example"a second"
)."first second"
-->"1st second"
or"fourth second"
-->"4th second"
).Of course, this logic would be probably necessary to be applied only to some languages, so it shouldn't be inside the main logic but in a language-specific section.
The text was updated successfully, but these errors were encountered: