OpenVoiceOS / ovos-classifiers

Apache License 2.0
3 stars 6 forks source link

inflection/ordinalize #3

Open emphasize opened 1 year ago

emphasize commented 1 year ago

https://github.com/OpenVoiceOS/ovos-classifiers/blob/4023416c374bce2a6807be83bfbea3df8ec822db/ovos_classifiers/heuristics/inflection.py#L148

The way it is coded, this only adds a given suffix. But i'm not clear about the usage. Is the input strictly int? Should it (in the end) also format spoken numbers?

In case of formatting, in german sometimes the "number" itself changes. How should this be covered? I could make it as easy as with en to just let subsequent services figure stuff out (by only adding a point - ie. 1., but i'm hesitant to do that

1: "eins" -> "erst(e/er)" (f/m)


Besides, and to make things worse the rule above is also broken if a direct article precedes

der (m) erste (f) Monat (m) die (f) zweite (f) Zahl (f)

and going all in, it is also reliant on the case (in combination with the nouns gender) (genitive) des ersten Monats (m) der zweiten Sprache (f)

JarbasAl commented 1 year ago

this would be the symbol after a integer number, the one that indicates we are talking about an ordinal number not a cardinal number

for english this is 1st, 2nd, 3rd, Nth

in portuguese we just add either º or ª depending on the grammatical gender of what the number refers too. eg " women" vs " man", the number itself is irrelevant

in any case, spelling out the number or handling number strings is out of scope here, that will require it's own methods (probably to be taken from LF)

emphasize commented 1 year ago

that's a bit of my problem here. If we are talking about inflections, this includes spoken numerals. Not immediate, but we should figure this out at some point