Getting it to work

This chapter describes how to install and execute FreeLing. The steps to follow may be different depending on your needs and platform.

The easiest way is installing from a pre-compiled binary package. Packages for the latest stable version are provided for Ubuntu/Debian Linux and Windows.

If you want to install on a distribution where provided .deb packages are not suitable, modify FreeLing code, or install a development version with no binary package available, then you need to install from source.

Here you'll find detailed instruction about each choice:

Other issues you might be interested in;

Calling FreeLing library from languages other than C++

FreeLing is written in C++, but it offers APIs to be called from Java, Python (2 and 3), or Perl, among others.

The APIs are generated by SWIG, and depend on the particular version of the target language you have installed. So, APIs are not included in the precompiled binary packages. If you plan to call FreeLing from a language other than C++, you should install it from source.

You'll find details about building and using the APIs in:

Reducing needed disk space

FreeLing packages include linguistic data for all supported languages, which total up over 1Gb of disk space.

It is possible to safely remove data for languages that are not needed, saving that space.

FreeLing installation directory contains all linguistic data in the subfolder FREELINGDIR/share/freeling. This folder contains a directory for each language.

To free space, you can simply remove the unneeded language directories FREELINGDIR/share/freeling/XX.

Make sure to keep FREELINGDIR/share/freeling/common, FREELINGDIR/share/freeling/config, and FREELINGDIR/share/freeling/XX for any language XX you want to process.

Where the folder FREELINGDIR is located, depends on which is your system and on how did you install FreeLing. * If you installed a Linux .deb package, FREELINGDIR is /usr * If you installed on Linux compiling from source, FREELINGDIR is /usr/local (unless you specified a custom installation directory... then, FREELINGDIR is that directory). * If you installed a Windows binary package, FREELINGDIR is the folder where you uncompressed it) * If you installed on Windows compiling from source, FREELINGDIR is the folder you used as CMAKE_INSTALL_PREFIX. If you used the default installation, it is C:\Program Files.

Executing

FreeLing is a library, which means that it not a final-user oriented executable program but a tool to develop new programs that require linguistic analysis services.

Nevertheless, a sample main program is included in the package for those who just want a text analyzer. This program may be adapted to fit your needs up to certain point (e.g. customized input/output formats, desired level of analysis) but very specific adaptations will require that you write your own main program, or adapt one of the existing examples.

The usage and options of this main program is described in this chapter.

Please take into account that this program is only a friendly interface to demonstrate FreeLing abilities, but that there are many other potential usages of FreeLing.

Thus, the question is not why this program doesn't offer functionality X?, why it doesn't output information Y?, or why it doesn't present results in format Z?, but How should I use FreeLing library to write a program that does exactly what I need?.

In the directory src/main/simple_examples in the tarball, you can find simpler sample programs that illustrate how to call the library, and that can be used as a starting point to develop your own application.