-
Notifications
You must be signed in to change notification settings - Fork 966
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
Ordinal Special Exceptions (Context/Plurality) #212
Comments
Can we infer this from a word somehow? |
@hazzik maybe? Generally speaking words ending in "o" are masculine (a book: un libro; a dog; un perro; kids: unos niños), words ending in "a" are feminine (an apple: una manzana; a shirt: una camisa), however, like most languages, there are a ton of exceptions. Many words with a foreign origin (Greek, etc) end in "a" are masculine (a theme: una tema) or end in "o" and are feminine (the picture: una photo[grafia]; the motorcycle: una moto[cicleta]) After that there are words that end in "e" (the cinema: un cine), "j" (the watch: un reloj), there are almost too many possibilities here and some are masculine only because the words don't flow (water: el agua/las aguas). Languages are confusing and I think Spanish is one of the simpler ones out there. At the end of the day, one (un/uno/una), first (primer/primero), third (tercer/tercero) seem to be the only ones with special gender rules mostly where you have to drop the "o" in singular masculine form. So we probably CAN infer this from the word, but it seems to create another problem. More info: Words that break the gender rule |
@thunsaker - you think this should be good now after #222? Can we close it? |
I think so, it addresses many of the concerns I had originally with context. I'll go ahead and close it, we'll revisit as needed. |
This came about from a conversation on #188 comment. Hopefully this make sense to everyone.
Context
I propose adding a "context" enum for special cases where (in Spanish) the spelling can be affected by the part of speech that accompanies it. Something like an override for
number.ToOrdinalWords(GrammaticalGender gender, GrammaticalContext context)
Maybe something like:
Dates
Do we need a way to handle humanizing dates with ordinals? ie: Converting April 4, 2014 to April Fourth Two Thousand Fourteen, which can already be done with existing API methods, but in pieces, far from convenient.
Using Spanish as an example, we would have a problem with Humanizing a date, since only the first (el primer de marzo) of the month uses the ordinal, the rest are just the cardinal number (el cinco de mayo). Are there examples in other languages or is this something that a developer would just have to know about?
Part of Speech
Depending on the part of speech whether we are talking about a noun, the 1st book (el primer libro) the "o" in primero gets dropped only in the masculine form, however it is preceded by anything else, the 1st to leave (el primero en salir) the "o" is retained. This also happens with tercero (3rd).
Plurality
If we are translating the ordinal into a plural form, the 1st to arrive (los primeros en llegar), the "o" is restored along with the added "s"
Maybe this could be addressed by having an overridable
number.ToOrdinalWords(GrammaticalGender gender, Plurality plurality)
method added to the exiting interface. Or just add one to Spanish if not needed in other languages.tl;dr - Need to handle special rule when 1st/3rd are preceded by a singular masculine noun
The text was updated successfully, but these errors were encountered: