Friday, June 11, 2010

Instalation of Freeling - Language Processing Tools in Ubuntu 9.10

Documentation is found in Freeling installation page. However, I've had several problems when following the described steps.

I followed the installation from .tar.gz source packages. Here I will describe the differences between what I did and the explanation from the .tar.gz installation page.

1. Install development tools

Ok

2. Install packaged requeriments
I installed the following package instead of
sudo apt-get install libboost-dev
sudo apt-get install libboost1.40-all-dev
(due to problems with libboost-filesystem)

3. Install non-packaged requeriments

Ok

4. Install Freeling
Previous installations OK
Installation of Freeling
sudo ./configure
sudo make
sudo make reported a bug when using libtool. I solved them by following the explanation of here. Basically, with the addition of these lines in file Freeling/libtool
# An echo program that does not interpret backslashes.
ECHO="echo"
+#well this $ECHO is referred to as $echo everywhere in this file. So:
+echo="$ECHO"

# Used to examine libraries when file_magic_cmd begins with "file".
MAGIC_CMD=file

sudo make
sudo make install
Problems with freeling/data/Makefile.am. I solved them by following the explanation of here.
Basically, with the Modification of all lines like
asdata_DATA = es/*
to
asdata_DATA = es/*.*
These lines refer to asdata, cadata, esdata, gadata, commondata, itdata... (one for each lang).
sudo make install
Now all was ok!

Examples
In the directory Freeling/src/main/simple_examples/
g++ -o sample sample.cc -ldb_cxx -lmorfo -lfries -lomlet -lpcre
I needed to add the library lboost_filesystem
g++ -o sample sample.cc -ldb_cxx -lmorfo -lfries -lomlet -lpcre
-lboost_filesystem

No comments:

Post a Comment