Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Collection of discourse segmenters (with pre-trained models for German)

Project Description

A collection of various discourse segmenters (with pre-trained models for German texts).


This python module currently comprises three discourse segmenters: edseg, bparseg, and mateseg.

is a rule-based system that uses shallow discourse-oriented parsing to determine the boundaries of elementary discourse units. The rules are hard-coded in the submodule’s file and are only applicable to German input.
is an ML-based segmentation module that operates on syntactic constituency trees (output from BitPar) and decides whether a syntactic constituent initiates a discourse segment or not using a pre-trained linear SVM model. This model was trained on the German PCC corpus, but you can also train your own classifer for any language using your own training data (cf. discourse_segmenter --help for further instructions on how to do that).
is another ML-based segmentation module that operates on dependency trees (output from MateParser) and decides whether a sub-structure of the dependency graph initiates a discourse segment or not using a pre-trained linear SVM model. Again, this model was trained on the German PCC corpus.


To install this package from the PyPi index, run

pip install dsegmenter

Alternatively, you can also install it directly from the source repository by executing:

git clone
pip install -r DiscourseSegmenter/requirements.txt DiscourseSegmenter/ --user


After installation, you can import the module in your python scripts (see an example here), e.g.:

from dsegmenter.bparseg import BparSegmenter

segmenter = BparSegmenter()

or, alternatively, also use the delivered front-end script discourse_segmenter to process your parsed input data, e.g.:

discourse_segmenter bparseg segment DiscourseSegmenter/examples/bpar/maz-8727.exb.bpar


discourse_segmenter mateseg segment DiscourseSegmenter/examples/conll/maz-8727.parsed.conll

Note that this script requires two mandatory arguments: the type of the segmenter to use (bparseg or mateseg in the above cases) and the operation to perform (which meight be specific to each segmenter).


Intrinsic evaluation scores of the machine learning models on the predicted vectors will be printed when training and evaluating a segmentation model.

Extrinsic evaluation scores on the predicted segmentation trees can be calculated with the evaluation script.


Note, that the script internally calls the DKpro agreement library, which requires Java 8.

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.9 MB) Copy SHA256 Hash SHA256
Wheel 2.7 Jan 25, 2017
(3.8 MB) Copy SHA256 Hash SHA256
Source None Jan 25, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting