Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This module is part of IXA-Pipeline, a multilingual NLP pipeline developed by the IXA NLP Group (

Ixa-pipe-srl provides a wrapper for English and Spanish dependency parser and semantic role labeller using mate-tools ( The module takes tokenized and POS-tagged text in NAF format as standard input and outputs syntactic and semantic analysis also in NAF.

The models for English and Spanish have been trained using PropBank(, NomBank( Ancora corpus ( in CoNLL 2009 Shared Task format (

The semantic annotation provided by the module is enriched using the PredicateMatrix (


Installing the ixa-pipe-srl requires the following steps:

If you already have installed in your machine JDK7 and MAVEN 3, please go to step 3 directly. Otherwise, follow these steps:

1. Install JDK 1.7

If you do not install JDK in a default location, you will probably need to configure the PATH in .bashrc or .bash_profile:

export JAVA_HOME=/yourpath/local/java7
export PATH=${JAVA_HOME}/bin:${PATH}

If you use tcsh you will need to specify it in your .login as follows:

setenv JAVA_HOME /usr/java/java17
setenv PATH ${JAVA_HOME}/bin:${PATH}

If you re-login into your shell and run the command

java -version

You should now see that your jdk is 1.7

2. Install MAVEN 3

Download MAVEN 3 from


Now you need to configure the PATH. For Bash Shell:

export MAVEN_HOME=/path-to-apache-maven/apache-maven-3.0.4
export PATH=${MAVEN_HOME}/bin:${PATH}

For tcsh shell:

setenv MAVEN3_HOME ~/local/apache-maven-3.0.4
setenv PATH ${MAVEN3}/bin:{PATH}

If you re-login into your shell and run the command

mvn -version

You should see reference to the MAVEN version you have just installed plus the JDK that is using.

3. Get module source code

git clone

4. Get external references

Some dependencies are not included in maven repositories, but they can be found in the Mate-tools package. First download mate-tools package:


Notice that the version of mate-tools needed is the 4.3. The module will not work with a higher version. The external references you should extract are liblinear-1.51-with-deps.jar, seg.jar and srl.jar:

tar -zxvf srl-4.3.tgz srl-20130917/lib/liblinear-1.51-with-deps.jar
tar -zxvf srl-4.3.tgz srl-20130917/lib/seg.jar
tar -zxvf srl-4.3.tgz srl-20130917/srl.jar

Now, install these dependencies into the local maven repository:

mvn install:install-file -Dfile=srl-20130917/lib/liblinear-1.51-with-deps.jar -DgroupId=local -DartifactId=liblinear -Dversion=1.51 -Dpackaging=jar
mvn install:install-file -Dfile=srl-20130917/srl.jar -DgroupId=local -DartifactId=srl -Dversion=1.0 -Dpackaging=jar
mvn install:install-file -Dfile=srl-20130917/lib/seg.jar -DgroupId=local -DartifactId=seg -Dversion=1.0 -Dpackaging=jar

5. Move into main directory

cd ixa-pipe-srl/IXA-EHU-srl

6. Install module using maven

mvn clean package

This step will create a directory called target/ which contains various directories and files. Most importantly, there you will find the module executable:


This executable contains every dependency the module needs, so it is completely portable as long as you have a JVM 1.7 installed.

To install the module in the local maven repository, usually located in ~/.m2/, execute:

mvn clean install

7. Download models

In the target directory, where the executable jar is, you must create a directory for trained modules. This directory should contain two subdirectories, one for the english modules and another for the spanish ones:

mkdir target/models
mkdir target/models/eng
mkdir target/models/spa

The module needs models for dependency parsing and semantic role labeling. You can get all the models required with the following commands:

wget --directory-prefix=target/models/eng/
wget --directory-prefix=target/models/eng/

wget --directory-prefix=target/models/spa/
wget --directory-prefix=target/models/spa/
wget --directory-prefix=target/models/spa/

Move the "models.conf" this file to the target directory.

mv models.cnf target/

Edit the "models.conf" file to set the path to the downloaded models.

8. Download the Predicate Matrix

In the target directory you must create a directory called PredicateMatrix.

mkdir target/PredicateMatrix

Now download and unpack the PredicateMatrix into that directory:

tar -zxf -C target/PredicateMatrix/
rm -f

9. Using ixa-pipe-srl

The input of the program must be tokenized and POS-tagged text in NAF format and must be giving as standard input.

First, the server must been initialize:

java -Xms2500m -cp /path-to-the-jar/target/IXA-EHU-srl-3.0.jar en

It is strongly recomended to reserve at least 2,5 gigabytes of memory for the execution of the server module. After loading all the modules the server will stay listening for client petitions. The client module can be executed in three different modes:

To perform dependency parsing and semantic role labelling:

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar en

To perform just dependency parsing:

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar en only-deps

To perform just semantic role labelling:

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar en only-srl

In the last case the input in NAF must contain syntactic dependencies too.

To run the server for Spanish:

java -Xms2500m -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar es

To run the program for Spanish:

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar es

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar es only-deps

cat infile.naf | java -cp /path-to-the-jar/IXA-EHU-srl-3.0.jar es only-srl


No description, website, or topics provided.






No packages published