co-reference resolution for German using the Maverick system
Project description
German Maverick Coref
Python Package
The maverick-coref-de Python package provides an easy API to use German Maverick models, enabling efficient and accurate coreference resolution with few lines of code.
Install the library from PyPI
pip install maverick-coref-de
or from source
git clone https://github.com/uhh-lt/maverick-coref-de.git
cd maverick-coref-de
pip install -e .
Loading a Pretrained Model
Maverick models can be loaded using huggingface_id or local path:
from maverick_de import Maverick
model = Maverick(
hf_name_or_path = "maverick_hf_name" | "maverick_ckpt_path", default = "fynnos/maverick-mes-de10"
device = "cpu" | "cuda", default = "cuda:0"
)
Inference
Predict
You can use model.predict() to obtain coreference predictions. For a sample input, the model will a dictionary containing:
tokens, word tokenized version of the input.clusters_token_offsets, a list of clusters containing mentions' token offsets.clusters_text_mentions, a list of clusters containing mentions in plain text.
Training
Create a Python venv and install from source.
git clone https://github.com/uhh-lt/maverick-coref-de.git
cd maverick-coref-de
pip install -e .
- Obtain data in
.conllformat split into train/dev/test - Run the
minimize.pyscript fromdatafor the correct dataset - Adjust
conf/data/<your dataset>.yamlfor your dataset - Adjust
conf/model/mes/<your encoder model>.yamlto - Adjust
conf/root.yamlto use the your dataset and your encoder model - Run
CUDA_VISIBLE_DEVICES=X python maverick_de/train.py
Citation
If you use this software, please consider citing our paper published at KONVENS 2025:
@inproceedings{petersenfrey-etal-2025-efficient,
title = "Efficient and effective coreference resolution for German",
author = "Petersen-Frey, Fynn and Hatzel, Hans Ole and Biemann, Chris",
booktitle = "Proceedings of the 21st Conference on Natural Language Processing (KONVENS 2025). Volume 1: Long and Short Papers",
month = "9",
year = "2025",
address = "Hildesheim, Germany",
publisher = "KONVENS 2025 Organizers"
}
The software in this repository is based on the on the work "Maverick: Efficient and Accurate Coreference Resolution Defying Recent Trends" by Giuliano Martinelli, Edoardo Barba, and Roberto Navigli published at ACL 2024 main conference. It uses their implementation forked from the original repository with some adaptions to a) make it compatible with German and b) try additional model variants. For English, refer to the original python package.
License
The data and software are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maverick_coref_de-1.0.6.tar.gz.
File metadata
- Download URL: maverick_coref_de-1.0.6.tar.gz
- Upload date:
- Size: 35.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6768ae262f9ef966d29bf0c2219e03ecb03a8f85f5684575114cbe25b92a29c6
|
|
| MD5 |
3ec5869c1cf1122a14805dd2eed4ece2
|
|
| BLAKE2b-256 |
5d7db541ea5a57875178666b5cded42f4838ac588439c28e24ab6003cc516720
|
File details
Details for the file maverick_coref_de-1.0.6-py3-none-any.whl.
File metadata
- Download URL: maverick_coref_de-1.0.6-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2801f6be265612f14c7ae3471977c1463ff5c93f8c1b503cd32a9d285e6d4e3
|
|
| MD5 |
7b4fc318ceaa30704e4abb48d812456f
|
|
| BLAKE2b-256 |
e9ee0ca554d27128df427a53444411467fc9833d5c405e73f7382ec3e54ed997
|