[libvoikko] different output via voikkogc and libreoffice-voikko
ftyers at prompsit.com
Tue Oct 1 16:54:46 EEST 2013
El dt 01 de 10 de 2013 a les 16:43 +0300, en/na Harri Pitkänen va
> On Tuesday 01 October 2013 11:53:05 Francis Tyers wrote:
> > I've managed to get voikkogc to return grammar errors as reported by the
> > CG... so far the code is quite horrific, but it seems to work. However,
> > when I try to run it through the libreoffice with the same sentence, I
> > don't get the same result. The grammar checking does not take place. It
> > never seems to get to "voikkoNextGrammarErrorUcs4". Any idea why this
> > might be ?
> Libreoffice-voikko does not know that it is possible to do grammar checking
> for language "se" and thus it will not even try.
Aha, that explains it :)
> In some previous mail I mentioned that some changes are required to the
> libvoikko API and libreoffice-voikko in order to allow grammar checking for
> languages other than Finnish. It seems like time for those changes is now: we
> need to add a function for retrieving the list of languages for which there is
> a grammar checker available.
Ok, I must have forgotten about that :)
> Would it be possible to merge the gramchk branch back to master? Once that is
> done I can make the necessary changes. Doing them in master now would lead to
> horrible merge conflicts.
As far as I'm concerned, it should be ok. There are the following
* The code is pretty ropey at the moment. It works, but no-one apart
from me has tested it as working. There is some stuff hardcoded there
(in the V4DictionaryLoader) that we are likely to want to change.
* There is a lot of debugging stuff in there that you might want to
remove during the merge.
* The grammar checking now depends on the latest SVN of hfst-ospell to
work. This is because previous versions did not have a lookup() method.
However, none of these problems should prevent merging, they can be
cleaned up as we move forward standardising the way of doing grammar
There is one show stopper:
* Grammar checking for Finnish is currently broken. I should fix this.
So, I think the best thing would be for me to fix Finnish, and then do
the merge. Feel free to take a look at the code and give me suggestions,
my code has rarely been described as elegant.
> Meanwhile you should be able to work around this problem by changing the
> language code of your dictionary from "se" to "fi".
Thanks! I'll try and fix Finnish then email the list.
More information about the Libvoikko