On Sat, Mar 24, 2012 at 10:38 PM, Jayamal De Vas Gunawardhana
<[email protected]> wrote:
> Hi Jacob..
>
> As I said earlier I have successfully compiled and built the lttoolbox.jar
> file. But yet I couldn't compile the language pack. Unfortunately I'm using
> Windows. Not the Ubuntu or any Linux version. So the given steps in the
> "Minimal installation from SVN" article doesn't suits me.
I'm afraid most of those who work on Apertium development use Linux,
so they don't have much experience trying to run it under Windows. I
did my work on the Java port back in 2010 on Windows however, so let
me try and give you a few pointers.

If you're going to build language pairs under Windows, the easiest
route is to use cygwin. You can download it from
http://www.cygwin.com/

You'll need to install at least the following packages on cygwin,
which you can do using the cygwin setup.exe (I grabbed this list of
needed packages from the list on
http://wiki.apertium.org/wiki/Apertium_on_Ubuntu)
g++, pkg-config, gawk, libxml2, libxml2-dev, libxml2-utils, xsltproc,
flex, automake, autoconf, libtool, libpcre3-dev

Then you can follow the instructions at
(http://wiki.apertium.org/wiki/Apertium_on_Windows#Building_under_Cygwin)
to build lttoolbox and apertium from source using the cygwin bash
shell.

Once those are built, then you can build language pairs inside cygwin as well.

> Although I tried
> the compiled language pair and mode files which provided by Mikel, I
> couldn't understand the path changing. Because It also consists with a
> Ubuntu path. I hope I can succeed the project If I could compile the
> language pack. Because I'm aware and I have a good knowledge on Android. So
> I kindly request your help to compile the language pair on windows platform.
> If you can guide me to change the paths of the mode files which Mikel have
> compiled, that could be a help for me.

Yeah, it's going to have unix paths, because it was compiled on his
unix system, and paths to the various parts of Apertium are hard-coded
in the .mode files. As I mentioned in another thread, the Java runtime
parses the .mode file and if it recognizes the component program being
called as one of the ones ported to the Java runtime, it calls that
instead. If you're using a language pair that doesn't use extra tools,
then the hard-coded paths to the programs shouldn't matter. However,
there may be an issue with loading the tx and bin files specified as
command-line arguments to the various transfer components.

The transfer components expect the path to those files to be supplied
on the command-line. If you built the language pair yourself from the
cygwin bash shell, then they'll have paths to where the files are on
your system, and the Java runtime can use some behind-the-scenes
finesse (cygwin's cygpath utility, so you'll need to make sure the
cygwin bin directory is on your path) to convert the paths between the
Windows and linux style.

Also, a bit of a caveat about .mode files. From my experience, some
language pairs dump .mode files in a system directory (such as the
/usr/local/share/apertium/modes directory, in my case), but neglect to
put some of their .mode files in the modes directory under the
language pair data directory. The Java runtime doesn't look for them
in that system directory. Instead, it looks for them in the "modes/"
folder under the supplied data directory. The solution (for now at
least) that I've found is to just manually copy over the modes
directory underneath the language pair directory.

I hope this made sense. If you have further questions, please ask.
I'll do what I can to help. ^_^

-- Stephen

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Apertium-stuff mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to