Update . I could formulate this question in abstract terms, but in this way it would be less illustrative. Therefore, please do not reduce it to be too specific.
I need to create a data structure to store information about the forms of English verbs. In most cases, a verb can be in one of four forms: the base, the present participle, the past participle and the past simple, for example:
It seems easy to identify 4 types for each form and finish with it. However, there are a few exceptions that destroy this simple idea.
- The real third party form, which in our example will be “he / she / she takes”.
- The copular verb "be" has several irregular forms in the present tense: "am", "is", "are" and "was" and "were" in the past tense
- Verbs like "may" that cannot fade in the form of a real third party: "she can."
What data structure will be effective, accurate, but unambiguous for the presentation of such information (in exceptional cases), given the following requirements:
- for arbitrary shape answer the question which conjugations form the form
- for arbitrary conjugation and forms answer the question, is the form a given conjugation or not?
Update : by effective, I meant that
- The answer to these questions should be fairly quick, and then slow.
- Memory consumption should be quite low and then high.
- the definition of the data structure should be rather brief and then detailed (I understand that efficiency is a matter of compromise).
source share