[libvoikko] Setting up HFST morphology backend

Sjur Moshagen sjurnm at mac.com
Thu Apr 29 00:03:56 EEST 2010

Den 28. apr. 2010 kl. 19.23 skrev Harri Pitkänen:

> On Wednesday 28 April 2010, Sjur Moshagen wrote:
>>> #define HAVE_HFST 1
>> It does.
>> I still get:
>> a83-245-189-120:voikko sjur$ voikkospell -s -d fi-x-hfst
>> E: Initialization of Voikko failed: Failed to create analyzer because of
>> unknown morphology backend
> I just checked and HFST works just fine here. Looking at 
> src/morphology/AnalyzerFactory.cpp where this error comes from I can only see 
> two possible explanations:
> 1) For some reason code inside #ifdef HAVE_HFST is not compiled. You can check 
> this by writing some invalid C++ inside the block and see if the code still 
> compiles or not.

It looks good, but I will check more tomorrow.

> 2) dictionary.getMorBackend() does not return string "hfst". Maybe your 
> voikko-fi_FI.pro contains a typo or it has been edited on OS X where some 
> strange control characters may get inserted at the end of line. Or maybe the 
> C++ code that reads this file behaves differently on OS X. What do the 
> following commands print?
> cat ~/.voikko/2/mor-hfst/voikko-fi_FI.pro

info: Voikko-Dictionary-Format: 2
info: Language-Code: fi_FI
info: Language-Variant: hfst
info: Description: Kokeellinen HFST-morfologia
info: Morphology-Backend: hfst
info: Speller-Backend: hfst
info: Suggestion-Backend: hfst
info: Hyphenator-Backend: hfst

> md5sum ~/.voikko/2/mor-hfst/voikko-fi_FI.pro

I only have md5, not md5sum, but it seems to do something similar:

a83-245-189-120:~ sjur$ md5 ~/.voikko/2/mor-hfst/voikko-fi_FI.pro
MD5 (/Users/sjur/.voikko/2/mor-hfst/voikko-fi_FI.pro) = 70c4c90ddfb0193a1f32efdabe683488


More information about the Libvoikko mailing list