Difference between revisions of "Matxin"
Line 30: | Line 30: | ||
If you get the error to do with "strlen was not declared in this scope", add <code>#include <string.h></code> to the files <code>src/libmorfo/automat.cc</code>, <code>src/libmorfo/dates.cc</code>, <code>src/libmorfo/locutions.cc</code>, <code>src/libmorfo/maco.cc</code>, <code>src/libmorfo/np.cc</code>, <code>src/libmorfo/nec.cc</code>, <code>src/libmorfo/numbers.cc</code>, <code>src/libmorfo/numbers_modules.cc</code>, <code>src/libmorfo/quantities.cc</code>, <code>src/libmorfo/tokenizer.cc</code> and <code>src/libmorfo/dates_modules.cc</code>. |
If you get the error to do with "strlen was not declared in this scope", add <code>#include <string.h></code> to the files <code>src/libmorfo/automat.cc</code>, <code>src/libmorfo/dates.cc</code>, <code>src/libmorfo/locutions.cc</code>, <code>src/libmorfo/maco.cc</code>, <code>src/libmorfo/np.cc</code>, <code>src/libmorfo/nec.cc</code>, <code>src/libmorfo/numbers.cc</code>, <code>src/libmorfo/numbers_modules.cc</code>, <code>src/libmorfo/quantities.cc</code>, <code>src/libmorfo/tokenizer.cc</code> and <code>src/libmorfo/dates_modules.cc</code>. |
||
If you get the error to do with "memcpy was not declared in this scope", add <code>#include <string.h></code> to the files <code>src/libmorfo/dictionary.cc</code> <code>src/libmorfo/traces.cc</code> <code>src/libmorfo/senses.cc</code> |
If you get the error to do with "memcpy was not declared in this scope", add <code>#include <string.h></code> to the files <code>src/include/traces.h</code>, <code>src/libmorfo/dictionary.cc</code>, <code>src/libmorfo/traces.cc</code> <code>src/libmorfo/senses.cc</code>, |
||
==Building== |
==Building== |
Revision as of 09:29, 16 April 2009
Matxin is a free software machine translation engine related to Apertium. It allows for deeper transfer than can be found in Apertium. The linguistic data available under a free-licence is a fraction of the data that is used in the papers and descriptions of the subject, so naturally the translations from the pair will be less good than you can find results in the paper.
Prerequisites
- libcfg+ — http://platon.sk/upload/_projects/00003/libcfg+-0.6.2.tar.gz
- BerkleyDB — sudo apt-get install libdb4.6++-dev
- libomlet — https://lafarga.cpl.upc.edu/frs/download.php/130/libomlet-0.97.tar.gz
- libfries — https://lafarga.cpl.upc.edu/frs/download.php/129/libfries-0.95.tar.gz
- FreeLing (version 1.5) — https://lafarga.cpl.upc.edu/frs/download.php/90/FreeLing-1.5.tar.gz
- If you're installing into a prefix, you'll need to set two environment variables: CPPFLAGS=-I<prefix>/include LDFLAGS=-L<prefix>/lib ./configure --prefix=<prefix>
Troubleshooting
- libfries
If you get the error to do with "strlen was not declared in this scope", add #include <string.h>
to the file src/include/fries/language.h
.
If you get the error to do with "set_union was not declared in this scope", add #include <algorithm>
to the file src/libfries/RGF.cc
.
- libomlet
If you get the error to do with "exit was not declared in this scope", add #include <stdlib.h>
to the file src/libomlet/adaboost.cc
.
- FreeLing
If you get the error to do with "exit was not declared in this scope", add #include <stdlib.h>
to the files src/utilities/indexdict.cc
, src/libmorfo/accents.cc
, src/libmorfo/accents_modules.cc
, src/libmorfo/dictionary.cc
, src/libmorfo/tagger.cc
, src/libmorfo/punts.cc
, src/libmorfo/maco_options.cc
, src/libmorfo/splitter.cc
src/libmorfo/suffixes.cc
src/libmorfo/senses.cc
src/libmorfo/hmm_tagger.cc
.
If you get the error to do with "strlen was not declared in this scope", add #include <string.h>
to the files src/libmorfo/automat.cc
, src/libmorfo/dates.cc
, src/libmorfo/locutions.cc
, src/libmorfo/maco.cc
, src/libmorfo/np.cc
, src/libmorfo/nec.cc
, src/libmorfo/numbers.cc
, src/libmorfo/numbers_modules.cc
, src/libmorfo/quantities.cc
, src/libmorfo/tokenizer.cc
and src/libmorfo/dates_modules.cc
.
If you get the error to do with "memcpy was not declared in this scope", add #include <string.h>
to the files src/include/traces.h
, src/libmorfo/dictionary.cc
, src/libmorfo/traces.cc
src/libmorfo/senses.cc
,
Building
- Checkout
$ svn co http://matxin.svn.sourceforge.net/svnroot/matxin
First comment out the deformatters in the Makefile.am
as they don't build properly.
Then do:
$ aclocal; automake -a; autoconf $ LTTOOLBOX_DIR=/home/fran/svnroot/local/unstable/ LDFLAGS="-L/home/fran/local/lib -L/usr/lib" CPPFLAGS="-I/home/fran/local/include" ./configure --prefix=/home/fran/local/
You will probably need to fix a few things in the file: src/Makefile
to get it to build, for example add:
DEFAULT_INCLUDES = -I. -I$(srcdir) -I/usr/include/libxml2 CPPFLAGS = -I<prefix>/include/lttoolbox-2.0 -I<prefix>/include
Executing
$ export MATXIN_DIR=<prefix> $ echo "Esto es una prueba" | \ ./Analyzer -f $MATXIN_DIR/share/matxin/config.cfg | \ ./LT -f $MATXIN_DIR/share/matxin/config.cfg | \ ./ST_inter --inter 1 -f $MATXIN_DIR/share/matxin/config.cfg | \ ./ST_prep -f $MATXIN_DIR/share/matxin/config.cfg | \ ./ST_inter --inter 2 -f $MATXIN_DIR/share/matxin/config.cfg | \ ./ST_verb -f $MATXIN_DIR/share/matxin/config.cfg | \ ./ST_inter --inter 3 -f $MATXIN_DIR/share/matxin/config.cfg | \ ./SG_inter -f $MATXIN_DIR/share/matxin/config.cfg | \ ./SG_intra -f $MATXIN_DIR/share/matxin/config.cfg | \ ./MG -f $MATXIN_DIR/share/matxin/config.cfg | \ ./reFormat Hau prueba bat da
Speed
Between 25--30 words per second.
Documentation
- Descripción del sistema de traducción es-eu Matxin (in Spanish)