Installation Steps
Installing LingPipe
LingPipe needs to be downloaded and unpacked and it's ready to use.
Building and Developing with LingPipe
This section explains how to develop with the LingPipe API, and also how to compile and test the build from source.
Installing Java
LingPipe requires a 1.5 or greater version of Java.
Installing Ant
Ant only needs to be downloaded and installed if you are using it for development and testing.
Installing LingPipe
Downloading LingPipe
The first step is to download. This can be done from the:
Unpacking LingPipe
Unpack the gzipped tar file into a new directory, which we will
henceforth call LingPipeDir
.
Installing Java
LingPipe requires a Java 1.4 or greater JVM installation to run and the JDK to compile. If necessary, see the:
Running Demos
GUI Demos
LingPipe runs demos in a graphical user interface (GUI) demos out of the box. For details, see:
Command-Line Demos
LingPipe also runs demos through a command-line interrface. In this way, LingPipe can be used in applications without any Java coding. For details, see:
Developing with LingPipe
API Documentation
Complete API documentation is available at:
LingPipe provides all of its functionality in the form of an application program interface (API). Much of this functionality is described in the form of tutorials. For details:
Please note that some links in the tutorials will not work unless the javadoc has been created. See below for instructions on generating the javadoc.
Compiling LingPipe
LingPipe is distributed with a build script for Ant. Although LingPipe may be compiled directly, we highly recommend installing the Apache Ant build tool; see
LingPipe is built from the directory it was
unpacked in, LingPipeDir
,
by invoking a single Ant build target:
> cd LingPipeDir/trunk
> ant compile
Ant knows, by means of a file naming convention, to invoke LingPipe's top-level build file, build.xml.
Compilation produces the directory LingPipeDir
/build/classes
, which
contains the compiled LingPipe classes (as well as some other resources).
We also recommend that you generate the javadoc:
> cd LingPipeDir/trunk
> ant javadoc
List of Ant Targets
The additional Ant development targets are listed in the following table.
Ant Targets | |
---|---|
Target | Description |
clean |
Removes all of the automatically generated components
from the distribution. These can be regenerated through
the Ant targets described below. This target removes the
following automatically generated items:
|
compile |
Compiles a version of LingPipe to the
build/classes
directory. This target does not recursively build the demos.
|
javadoc |
Generated the javadoc for LingPipe and places
the index in docs/api/index.html
from the distribution. |
jar |
Generates a jar (library of compiled code) for
LingPipe and puts it in the top level file
lingpipe-3.9.3.jar .
To actually use the new jar in the distribution, it should be moved
up to the top level parallel to the build file. This target will
compile if necessary. Note that this will overwrite the existing
jar distributed with LingPipe.
|
test |
Runs the LingPipe unit tests. Testing is carried out against the top level jar file. This target will compile and create the jar if necessary. |
test1 |
Runs a unit test on a single class. This target
will compile and create the jar if necessary.
Invoke with system property test.class
set to the name of LingPipe package and class to test.
For example:
ant test1 -Dtest.class=classify.ClassifierEvaluatorTestThe target will prefix com.aliasi.test.unit
and postfix Test , invoking the test case
com.aliasi.test.unit.classify.ClassifierEvaluatorTest
for the above example.
|
tar |
Creates the LingPipe tarball for distribution. It
will be created in the file build/lingpipe-3.9.3.tar.gz .
This target will create the jar and the web site if necessary.
|
web |
Generates the public LingPipe web pages as
published at http://alias-i.com/lingpipe .
These will be created in the directory docs/api
and the home page will be created in docs/api/index.html .
This target will create the tarball if necessary, as it is included
in the web page.
|
cd |
Generates the public LingPipe distribution CD,
as distributed at all your favorite conferences.
This task will generate the web site if necessary,
as it is included with the distribution.
Warning: The Java Runtime Engines are not distributed with LingPipe. In order to create the CD image, the following paths need to exist with the correct files in them for the relevant JRE installers:
|
Installing Java
We recommend installing one of the latest versions of Sun's Java 2 Standard Edition (J2SE). The exact install depends on operating system and intended usage.
Downloading Java
The active versions of Java are:
Java 5 is reaching end-of-life October 30, 2009, and Java 7 has not yet been released as of October 2009, so we recommend version 6.
Checking the Java Install
To test that an appropriate Java is installed, or the instructions below worked, run the following command:
> java -version
The result should be a version numbered 1.5.0 or higher.
Java End User Install
End users only need the Java 2 Standard Edition (J2SE) Java Runtime Engine (JRE). It contains everything you need to run LingPipe. You will need to choose the appropriate installation for your platform. Make sure it's installed by following the instructions above.
Java Developer Install
Developers will need to install the Java 2 Standard Edition (J2SE) Software Development Kit (SDK). You will need to choose the appropriate installation for your platform.
Java Documentation Install
Sun bundles their Java API documentation separately and you will also need to download and unzip it if you want to read it. You can test it with a web browser.
Installing Ant
Ant is an Apache project used for scripting Java builds. Quoting from Ant's home page, "[Ant] is kind of like Make, but without Make's wrinkles". LingPipe is distributed with a complete set of Ant build files.
The Ant home page is on the Apache site:
The download page is here:
This is set up like most Apache pages to automatically mirror in
random rotation. About halfway down the page you will see a bulleted
list of hot links for the actual download; e.g. the gzipped tar
version is linked as apache-ant-version-bin.tar.gz
.
Some of the demos may also require additional jars, such as
ones to run Tomcat web deploys, etc. Many of these are distributed
in the demos/lib
subdirectory of LingPipe.
Uncompressing in Windows: Zip et al.
If you are a Windows user and don't have a utility for untarring, un-gzipping and un-zipping, we would recommend one of the following packages:
- CygWin: A fairly complete Unix-like environment for Windows. It's what we use here at Alias-i for development when we're on a Windows box.
- WinZip: A GUI tool for unpacking. It's not free, but does come with a free trial version. Warning: It doesn't scale as well as the command line versions to really big files (over 2GB).
The Windows Command Interpreter
Windows can be used from the command line using the DOS shell. There are two standard ways to start it. From the start menu:
Start >> Programs >> Accessories >> Command Prompt
Or from the Run box, which can be invoked from the start menu:
Start >> Run
or by holding down the windows key (if you have one) and the letter
r
. When the Run window pops up, enter
cmd
into the text box labeled Open:
and
press the OK
button.
The size of the window can be changed by right clicking on
its top title bar and selecting Properties
. Font size
can also be changed. Lucida Console is good for coding because
it's clear and narrow. We would also suggest the quick edit
and insert modes from the options menu.
For more information see: