[libvoikko] hfst-ospell API

Harri Pitkänen hatapitk at iki.fi
Wed Sep 8 19:56:43 EEST 2010

On Wednesday 08 September 2010, Flammie Pirinen wrote:
> Ok, I got it working with current SVN revision without any serious
> problems, the attached patch will update spell checking and correction
> code and comment out the rest, so I didn't commit it yet.  It doesn't
> depend HFST library anymore. I also had a bit of problem with
> autoconfiscate so I hard-coded -lhfst-ospell to src/Makefile.am.

That linker flag should be used when linking the library, now it is used with 
voikkospell binary. I can't remember exactly how we did this when we used 
Malaga, but I think we got it working. So maybe looking at SVN changes from 
about a year ago when we dropped the Malaga dependency would give a hint on 
what needs to be changed.

For committing I'm happy with just about anything that passes all automated 
tests. We have only one set of tests for HFST: test/hfst/NorthSamiTest.py
That tests only spell checking and correction so if the patch works, it should 
be enough. Hyphenation etc. could be added later with new tests.

Anyway, it seems that I'm unable to build HFST from current trunk. Of course I 
could just build the optimized lookup library but I'd like to be able to build 
an updated sme morphology and would need the tools for that. From root of 

$ ./configure --prefix=/home/harri/apps --without-foma
$ make
make[5]: Siirrytään hakemistoon 
depbase=`echo HfstTokenizer.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -
DHAVE_CONFIG_H -I. -I../../..     -g -O2 -MT HfstTokenizer.lo -MD -MP -MF 
$depbase.Tpo -c -o HfstTokenizer.lo HfstTokenizer.cc &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -g -O2 -MT 
HfstTokenizer.lo -MD -MP -MF .deps/HfstTokenizer.Tpo -c HfstTokenizer.cc  -
fPIC -DPIC -o .libs/HfstTokenizer.o
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -g -O2 -MT 
HfstTokenizer.lo -MD -MP -MF .deps/HfstTokenizer.Tpo -c HfstTokenizer.cc -o 
HfstTokenizer.o >/dev/null 2>&1
depbase=`echo ConvertTransducerFormat.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;
        /bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -
DHAVE_CONFIG_H -I. -I../../..     -g -O2 -MT ConvertTransducerFormat.lo -MD -
MP -MF $depbase.Tpo -c -o ConvertTransducerFormat.lo 
ConvertTransducerFormat.cc &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../../.. -g -O2 -MT 
ConvertTransducerFormat.lo -MD -MP -MF .deps/ConvertTransducerFormat.Tpo -c 
ConvertTransducerFormat.cc  -fPIC -DPIC -o .libs/ConvertTransducerFormat.o
In file included from /usr/include/c++/4.4/backward/hash_map:60,
                 from SFST/src/sgi.h:19,
                 from SFST/src/alphabet.h:26,
                 from SFST/src/fst.h:15,
                 from ConvertTransducerFormat.h:30,
                 from ConvertTransducerFormat.cc:17:
/usr/include/c++/4.4/backward/backward_warning.h:28:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be 
removed without further notice at a future date. Please use a non-deprecated 
interface with equivalent functionality instead. For a listing of replacement 
headers and interfaces, consult the file backward_warning.h. To disable this 
warning use -Wno-deprecated.
ConvertTransducerFormat.cc: In function ‘SFST::Transducer* 
ConvertTransducerFormat.cc:344: error: request for member ‘c_str’ in 
‘it.fst::SymbolTableIterator::Symbol()’, which is of non-class type ‘const 
ConvertTransducerFormat.cc: In function 
ConvertTransducerFormat.cc:680: error: request for member ‘c_str’ in 
‘it.fst::SymbolTableIterator::Symbol()’, which is of non-class type ‘const 
ConvertTransducerFormat.cc: In function 
ConvertTransducerFormat.cc:765: error: request for member ‘c_str’ in 
‘it.fst::SymbolTableIterator::Symbol()’, which is of non-class type ‘const 
make[5]: *** [ConvertTransducerFormat.lo] Virhe 1
make[5]: Poistutaan hakemistosta 
make[4]: *** [all] Virhe 2
make[4]: Poistutaan hakemistosta 
make[3]: *** [all-recursive] Virhe 1
make[3]: Poistutaan hakemistosta "/home/harri/svn/hfst/hfst3/libhfst/src"
make[2]: *** [all-recursive] Virhe 1
make[2]: Poistutaan hakemistosta "/home/harri/svn/hfst/hfst3/libhfst"
make[1]: *** [all-recursive] Virhe 1
make[1]: Poistutaan hakemistosta "/home/harri/svn/hfst/hfst3"
make: *** [all] Virhe 2


More information about the Libvoikko mailing list