[libvoikko] Setting up HFST morphology backend
    Sjur Moshagen 
    sjurnm at mac.com
       
    Thu Apr 29 08:09:14 EEST 2010
    
    
  
Den 29. apr. 2010 kl. 00.03 skrev Sjur Moshagen:
> 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.
I added one line of garbage:
	#ifdef HAVE_HFST
	if (dictionary.getMorBackend() == "hfst") {
		return new HfstAnalyzer(dictionary.getMorPath());
		garbage
	}
	#endif
Make:
morphology/AnalyzerFactory.cpp:48: error: ‘garbage’ was not declared in this scope
morphology/AnalyzerFactory.cpp:49: error: expected `;' before ‘}’ token
make[3]: *** [morphology/AnalyzerFactory.lo] Error 1
That is, without this garbage it seems to compile fine including the hfst backend. I'm puzzled.
Sjur
    
    
More information about the Libvoikko
mailing list