Skip to content

Detection of grammatical category values at runtime #31

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

Closed
grhoten opened this issue Feb 9, 2020 · 2 comments
Closed

Detection of grammatical category values at runtime #31

grhoten opened this issue Feb 9, 2020 · 2 comments
Labels
out-of-scope? requirements Issues related with MF requirements list

Comments

@grhoten
Copy link
Member

grhoten commented Feb 9, 2020

Is your feature request related to a problem? Please describe.
In addition to issue #16, it's helpful to be able to detect grammatical gender, grammatical number and even grammatical case of a given variable. If a user defined value from a variable needs to agree with a verb, number, article or preposition, this functionality will be required. Most message formatting implementations assume that you already know this information at build time, but this needs to be flexible enough to know at runtime.

Describe the solution you'd like
Typically a dictionary is needed in such scenarios. Sometimes a heuristic can be used for some languages. Though sometimes it's helpful if this data can be overridden as needed.

Describe why your solution should shape the standard
It's near impossible right now to get the correct verb, number, article or preposition correct in several gendered languages. You will also need to know if the word/phrase starts or ends with a consonant or a vowel. This is important for the English indefinite article, French articles, Italian articles, and the "and/conjunction" list for Spanish, Italian and Korean.

Additional context or examples
Siri already does this for various languages. See Let's Come To An Agreement About Our Words for examples.

@mihnita
Copy link
Collaborator

mihnita commented Feb 15, 2020

Maybe rephrase this in a way that is independent of "detection"

I think there might be a few mechanisms that one can use:

  • Together with the message specify a set of possible values. That can be direct string values, or references (identifiers) to other messages. For example you deleted the last {foo} with `foo : oneof ["folder", "file", "image", account"]. Translators would have a way to "annotate" the possible values (feminine-singular, definite-article, ...)
  • Algorithmic (real algorithm, ML model, etc.)
  • Service

Ideally the message format side it would be unaware of that. It would define the "form" required, and would understand the "annotations". Would not need to know where the annotations come from.
Might need a way to "plugin" the calls to a ML model / algorithm / service.
TBD.
Just thinking out loud :-)

@mihnita mihnita added the requirements Issues related with MF requirements list label Sep 24, 2020
@aphillips
Copy link
Member

As mentioned in today's telecon (2023-09-18), closing old requirements issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
out-of-scope? requirements Issues related with MF requirements list
Projects
None yet
Development

No branches or pull requests

3 participants