Trankit: A Light-Weight Transformer-based Toolkit for Multilingual Natural Language Processing

Minh Van Nguyen, Viet Dac Lai, Amir Pouran Ben Veyseh, Thien Huu Nguyen
1/9/2021
cs.CL
transformer-attention

Official code: nlp-uoregon/trankit (797 stars, Python, Apache-2.0, PyTorch, last commit 2025-07-22).

Abstract

We introduce Trankit, a light-weight Transformer-based Toolkit for multilingual Natural Language Processing (NLP). It provides a trainable pipeline for fundamental NLP tasks over 100 languages, and 90 pretrained pipelines for 56 languages.

Show full abstract

Built on a state-of-the-art pretrained language model, Trankit significantly outperforms prior multilingual NLP pipelines over sentence segmentation, part-of-speech tagging, morphological feature tagging, and dependency parsing while maintaining competitive performance for tokenization, multi-word token expansion, and lemmatization over 90 Universal Dependencies treebanks. Despite the use of a large pretrained transformer, our toolkit is still efficient in memory usage and speed. This is achieved by our novel plug-and-play mechanism with Adapters where a multilingual pretrained transformer is shared across pipelines for different languages. Our toolkit along with pretrained models and code are publicly available at: https://github.com/nlp-uoregon/trankit. A demo website for our toolkit is also available at: http://nlp.uoregon.edu/trankit. Finally, we create a demo video for Trankit at: https://youtu.be/q0KGP3zGjGc.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

Trankit is a Light-Weight Transformer-based Python Toolkit for Multilingual Natural Language Processing

797107PythonJan 8, 20211 years agoApache-2.0
adaptersartificial-intelligencedeeplearningdependency-parsinglanguage-model+12 more

Similar Papers

Cite this paper

@article{nguyen2021trankit,
  title  = {Trankit: A Light-Weight Transformer-based Toolkit for Multilingual Natural Language Processing},
  author = {Minh Van Nguyen and Viet Dac Lai and Amir Pouran Ben Veyseh and Thien Huu Nguyen},
  year   = {2021},
  eprint = {2101.03289},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.03289}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.03289.svg)](https://codeofpaper.com/paper/2101.03289)

Discussion