[libvoikko] error handling in the grammar checker

Sjur Moshagen sjurnm at mac.com
Tue Oct 1 21:53:24 EEST 2013

1. okt. 2013 kl. 21:42 skrev Harri Pitkänen <hatapitk at iki.fi>:

>> One question is, which information would we like to have in the file ?
>> To deal with the Finnish we'd need at least something like:
>> <code>13</code>
>> <descriptions>
>>  <description xml::lang="fin"/>
>>  <description xml::lang="eng"/>
>> <description>
>> We could also think about having long/short descriptions, and also of
>> linking in the suggestions somehow.
>> Any thoughts on a nice file format for this ?
> I think we need two codes: int for the current API and string for the new one:
> <code>grm-wrong-case</code>
> <legacyCode>6</legacyCode>
> <descriptions>
>  <shortDescription xml::lang="fi"/>
>  <longDescription xml::lang="fi"/>
>  <shortDescription xml::lang="en"/>
>  <longDescription xml::lang="en"/>
> </descriptions>

Should the format be enhanced with variables or pointers to the error string in the original text? Cf the error messages found in  the MS Office grammar checkers, which often refer to a word form (in context), and give a textual explanation for why the given suggestion would be a reasonable correction of the error. Hypothetical example:

"Check the word forms ABC and DEF. ABC seems to be a subject in plural, but the main verb DEF is in singular. Either change the subject or the verb:


It might be that this example is a bit elaborate, but I expect that many users of the Sámi grammar checker will not have Sámi as their first language, and giving a correct and explicit error message would be very useful.


More information about the Libvoikko mailing list