I need to specify noun casing for Latvian rules. How to I codify rules that determine the case of a word? How do I make grammar rules based on the case of the word?
Use regexp=“yes” and case_sensitive=“yes” for rules like that.
I don’t understand what you are trying to do, but you might need this.
Can you give an example?
For example https://en.wikipedia.org/wiki/Latvian_declension#Masculine_declensions. For any given word, there are 7 cases the word can be put into depending on the part of speech it is used for.
Nominative is the subject, Accusative is the object, Dative is the indirect object, etc. For grammar rules, certain grammatical constructions require the noun to be put into a particular case.
It’s somewhat similar to verb conjugation.
Ah, this was not about case, but about declension. All those forms should be in the postag database, and can be referred to using the postag. Just check the grammar file of English, German, Polish, or any other language you know besides Latvian.
Are you planning to add rules? Can you give an example sentence with an error and the corresponding correction and the reason why it is wrong?