| commit | fbeafa51e4e0ec8012401aa09ca92edd173e9512 | [log] [tgz] |
|---|---|---|
| author | Marc Kupietz <kupietz@ids-mannheim.de> | Thu Aug 06 16:14:18 2026 +0200 |
| committer | Marc Kupietz <kupietz@ids-mannheim.de> | Mon Aug 10 12:19:58 2026 +0200 |
| tree | 43f7d28a9363ce9d3e01bbbc21cdd02c943368f4 | |
| parent | ae0b585d39d4e1a2d28043621d4c6125e2577c5c [diff] |
Support custom corpus documentation templates Mount a "custom" directory into the kalamar container, so users can describe their own corpus in the KorAP user interface: Kalamar serves a documentation page from there whenever it does not ship one itself, so a doc/corpus.html.ep becomes the corpus page. Ship examples for that page, for an optional references page, and for the corpus part of the references page. The directory defaults to ./custom and can be relocated with KALAMAR_TEMPLATES. Also allow overriding the kalamar image via KALAMAR_IMAGE, which is needed to try this out on a Kalamar built from an unreleased version. The references page needs the citation partial of Kalamar 0.66 or later. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Change-Id: I8d964c996c15aa1d4ea85f18be223d737ed6d528
The KorAP Corpus Analysis Platform consists of several independent components, but they can easily be installed together using Docker. This repository contains a recipe to install all components needed to run KorAP on your own local machine with a single command.
Install docker and docker compose (>= v2; as a CLI plugin).
To get KorAP running, an index is required. For testing, there is a test index available as a docker image. Just run
COMPOSE_PROFILES="open,example" INDEX='example-index' docker compose -p korap up
to start the example image and the service with Linux (See here for more information on Windows).
To run without the export plugin, set KALAMAR_EXPORT=false or omit export from COMPOSE_PROFILES:
COMPOSE_PROFILES="open,example" KALAMAR_EXPORT=false INDEX='example-index' docker compose -p korap up
It's also possible to download the sample index provided by Kustvakt. To download, intialize and run KorAP pointing to that index folder (in this example stored in the index folder in the local directory), run
COMPOSE_PROFILES="open" INDEX=./index docker compose -p korap up
This will make the frontend be available at localhost:64543.
To use your own index, please follow the instructions on Corpus Conversion first.
To run the service with a user management system, first create a directory data in your working directory and then start it with
COMPOSE_PROFILES="auth" INDEX=./index docker compose -p korap up
Login with user1 and password1. To change authentication settings, see the /kusvakt/ldap folder inside the docker container and Kustvakt's LDAP Settings Wiki for documentation.
The documentation pages of the user interface can be adapted without rebuilding the Kalamar image: the custom/ directory of this repository is mounted into the container, and Kalamar serves a documentation page from there whenever it does not ship one itself. To describe the corpus you are serving, copy the example and edit it:
cp custom/doc/corpus.html.ep.example custom/doc/corpus.html.ep $EDITOR custom/doc/corpus.html.ep docker compose restart kalamar
The page is then served at /doc/corpus. Kalamar's documentation menu has no corpus entry of its own; to add one, mount your own templates/doc/navigation.json over the one Kalamar ships. custom/ also contains examples for a references page listing how to cite your corpus. See custom/README.md for details, and set KALAMAR_TEMPLATES to keep the templates somewhere else:
KALAMAR_TEMPLATES=/path/to/my-templates COMPOSE_PROFILES="open" INDEX=./index docker compose -p korap up
This requires Kalamar 0.66 or later.
As of June 2026, the corpus conversion, annotation and indexing process has been significantly simplified and is now orchestrated by KorAP-Ingestion. In many cases, a simple make command is sufficient to ingest your TEI XML data and launch your own KorAP instance. For comprehensive instructions and advanced options, please refer to the KorAP-Ingestion documentation.
Windows with Powershell requires environment variables to pass in a different way. In addition the PWD variable is not set beforehand. To run the KorAP one-liner with Windows, you have to start
$env:INDEX='example-index'; $env:PWD='.'; $env:COMPOSE_PROFILES='open,example'; docker compose -p korap up
Authors: Nils Diewald, Harald Lüngen, Marc Kupietz
Copyright (c) 2022-2026, IDS Mannheim, Germany
KorAP-Docker is published under the BSD-2 License.
The example corpus corresponds to the release part of the Dortmunder Chatkorpus 2.2 as prepared by DeReKo. The corpus is released under the CC BY 4.0 License. Legal restrictions may arise from data protection legislation.
Beißwenger, Michael / Storrer, Angelika (2008): Corpora of Computer-Mediated Communication. In: Anke Lüdeling & Merja Kytö (Eds): Corpus Linguistics. An International Handbook. Volume 1. Berlin. New York (Handbooks of Linguistics and Communication Science 29.1), pp. 292--308.