gustafl / lexeme

A new take on language learning.
1 stars 0 forks source link

Figure out how to support dependencies among grammatical categories #82

Open gustafl opened 8 years ago

gustafl commented 8 years ago

Consider the case of modal verbs, which are a subgroup of auxiliary verbs. In this case it would be confusing to show the modal verb button unless the user has clicked the auxiliary verb button.

As with issue #75, we probably need a column named dependency with a foreign key pointing back to a row in the grammatical_category table. For starters, let's assume that no grammatical category is ever dependent on more than one other grammatical category. The dependency column would optionally hold a single ID of another grammatical category.

gustafl commented 8 years ago

I'm moving this to the next release. I want to see how this could be solved in MongoDB first (issue #86). For the 0.1.0 release, let's just include the basic and obvious grammatical properties and grammemes.

gustafl commented 7 years ago

We won't use MongoDB (see #86 ), so this is ready to implement.

In order to accomodate for rules of agreement (e.g. where adjectives are inflected based on number, which is a grammatical category related to nouns), we also need a lexical_category_home bit.

Instead of adding a new field on the grammatical_category table, I think it's enough to add separate grammatical categories with the same name, one for each lexical category. For instance, number would appear once with lexical category 1 (noun) and once with lexical category 3 (adjective) in a language where adjectives must agree with number (which is typically related to nouns).

Thanks to the language_grammatical_category table, we are able to keep track of the rules of agreement in different languages. For a language where adjectives don't agree with number, the adjective-number relation are simply not included.