Dependency parser based on Alpino and KAF/NAF as input/output
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

#Dependency parser for Dutch#

This module implements a dependency parser for Dutch based on the Alpino parser. The input/output format is KAF/NAF format (a description of the KAF format can be found at This is the specification of the input/output:

  • Input: a valid KAF/NAF file at least with the <text> and <term> layer
  • Output: the input KAF/NAF file extended with dependencies (<deps> layer)


This module is fully implemented using Python, so you will need to have it installed on your machine (recommented version 2.7). There are some requirements:

These are the steps recommend for the installation. You can skip any step if that tool/library is already installed on your machine.

##1 Install the Alpino parser##

To install the Alpino parser we recommend to download the binary package that suits your system (

##2 Install the lxml library##

If you have "pip" install on your machine, for installing lxml you just have to run:

pip install lxml

You can check the installation procesure at

##3 Install the KafNafParser##

This is a python module, and you will need just to clone it in order to have it installed. Execute this command:

git clone

##4 Install the dependency parser##

Again only cloning the repository from our CLTL github account is required:

git clone

##5 Setting up##

The dependency parser needs to know where Alpino and the KafNafParser were installed. So you will have to specify the path to these tools in the file config.cfg. Open it with a text editor and set the paths to the correct paths where you installed Alpino and KafNafParser in your local machine. If Alpino has been installed on "/Users/ruben/NLP_tools/Alpino" and the KafNafParser on "/Users/ruben/cltl_github/KafNafParserPy" this is an example of configuration file:

alpino_home = /Users/ruben/NLP_tools/Alpino/
kaf_naf_parser_path = /Users/ruben/cltl_github/

Note than the name of the repository must be excluded from the variable kaf_naf_parser_path.


The main script is the file This script reads a KAF/NAF from the standard input and writes the resulting KAF/NAF on the standard output, generating some log information on the standard error. These are some examples:

$ cat input.kaf | > output.kaf 2> output.err
$ cat input.naf | python > output.naf 2> /dev/null

If the first call doesn't work in your case, try calling "python" specifically, as in the second example.



Sofware distributed under GPL.v3, see LICENSE file for details.