openstenoproject / plover_michela

Michela (Italian system) support for Plover.
10 stars 4 forks source link

Grammar rules to apply suffixes #3

Closed Sillabix closed 3 years ago

Sillabix commented 6 years ago

As for the English stenotype plugin, would be useful to provide the system with some grammar rules to correctly apply suffixes and word endings. E. g. "amare" + ^ti = "amarti", "portano" + ^dole = "portandole", "contatto" + ^ti = "contatti".

benoit-pierre commented 5 years ago

Just provide me the rules and I'll add them to the system.

Sillabix commented 5 years ago

Just one question. On other softwares, after the rules are applied the program checks if the word is correct against a spelling dictionary. I suppose Plover does the same. Is it so?

benoit-pierre commented 5 years ago

Yes, using a simple wordlist.

Sillabix commented 5 years ago

Ok, so I guess I should provide an Italian wordlist big enough to act as a spelling dictionary...

benoit-pierre commented 5 years ago

Note that the words are ranked, so more common words get priority: if multiple orthography rules can be applied, the most common resulting word will be chosen.

Sillabix commented 5 years ago

For the moment it would be enough to have just a simple rule for suffixes similar to the one used with commercial steno softwares which goes like this:

^ti = ti,^ti, ^^ti

which means: when there is the suffix "^ti", try to apply it to the end of the previous word. If no words are found in the wordlist, try to delete the last character of the previous word and check it on the wordlist. If there isn't any word found in the wordlist, try to delete the two last characters of the previous word and check it on the wordlist. If no words are found also in this case, just apply the suffix as is. So with this rules would be possible to write word like "portata-mi" (portata+mi), portarmi" (portare+mi) and "affermi" (afferro+mi).

Sillabix commented 5 years ago

Or, if that rule is not possible, could just be fine to have a single rule to apply the suffix to the root word just deleting one (or two) character from the end. This rule should be applied to the following suffixes:^ce, ^ci, ^la, ^le, ^li, ^lo, ^mi, ^ne, ^se, ^si, ^so, ^te, ^ti, ^dola, ^dole, ^doli, ^dolo.