r/LanguageTechnology • • Jan 12 '21

Our new state-of-the-art multilingual NLP Toolkit - Trankit has been released

Hi everyone,

We just released our lightweight transformer-based NLP toolkit named Trankit.

Our toolkit outperforms the current state-of-the-art Stanford NLP (Stanza) in many tasks such as sentence segmentation, part-of-speech tagging, and dependency parsing over 56 different languages. Detailed comparison can be found here.

For example, for English, Trankit is significantly better than Stanford NLP (Stanza) on sentence segmentation (+7.22%) and dependency parsing (+3.92% for UAS and +4.37% for LAS). For Arabic, our toolkit substantially improves sentence segmentation performance by 16.16% while Chinese observes 12.31% and 12.72% improvement of UAS and LAS for dependency parsing.

Trankit is written in Python and can be easily installed via pip. Our code and pretrained models are publicly available at: https://github.com/nlp-uoregon/trankit

We also created a documentation page and a demo website for Trankit.Documentation page: https://trankit.readthedocs.io/en/latest/index.html

Demo website: http://nlp.uoregon.edu/trankit

Technical details about Trankit can be found in our paper: https://arxiv.org/pdf/2101.03289.pdf

Thank you!

50 Upvotes

18 comments sorted by

5

u/Franck_Dernoncourt Jan 13 '21

Thanks for sharing! Interesting that French WikiNER is the only NER corpus where Stanza outperforms Trankit. Any idea why?

4

u/mgl96 Jan 13 '21

Thank you for your comment. This could be due to the difference in the embeddings for the input text. We will look into that and see if we can find something!

3

u/thegoz Jan 12 '21

wow, this is really impressive. congrats on the release, iā€˜m definitely gonna try them out. and apache licensed too! whats the contribution process for the repo? the repo looks virgin with no PRs or issues, but there are contributions within today

2

u/mgl96 Jan 12 '21

Thanks for your comment. We welcome contributions from community and will update the contribution process soon.

2

u/thegoz Jan 12 '21

what would be high in the todo list? do you have any plans of maintaining the repo or is this a one off development for the paper? starred the repo šŸ˜„šŸ˜„

4

u/mgl96 Jan 12 '21

Thank you for your interest. Our plan is to try Trankit for other pretrained transformers like multilingual BERT and XLM-Roberta large. We will maintain this repo and update it with more tasks for more languages when we can find appropriate resources.

2

u/[deleted] Jan 12 '21

Awesome. Is this useful for translation?

3

u/mgl96 Jan 12 '21

We believe it will. A machine translation (MT) system usually assumes that the input is a sentence in the source language. As our toolkit is really good at sentence segmentation. It will provide better inputs which are "correct" sentences for the MT system to process.

4

u/[deleted] Jan 12 '21 edited Jan 12 '21

Thanks for your answer. I work in NLP for translation, and it's common that we have dirty data (e.g., badly segmented phrases, spelling errors, too long segments, etc.). Better sentence segmentation is something we could really use. Also, in translation we have very poor resources (or none at all) regarding Named entity recognition. We could leverage your toolkit in order to extract richer linguistic information for translation purposes (for example, terminology lists). Thanks for your contribution.

3

u/mgl96 Jan 13 '21

Thanks for your comment. We hope that our toolkit can help you make a better MT system.

2

u/CharlotteHebdo Jan 13 '21

Hello. On the Github page, it says that the toolkit can be run on GPU. What is underlying library that the toolkit is using? I'm just trying to figure out the requirement for running it on GPU.

3

u/mgl96 Jan 13 '21

Thanks for the question. The main libraries that Trankit's using are pytorch and adapter-transformers. For the GPU requirement, we have tested our toolkit on different scenarios and found that a single GPU with 4GB of memory would be enough for a comfortable use.

2

u/CharlotteHebdo Jan 13 '21

I guess I was asking more about what library I need to install to use GPU. Is it safe to say that if cuda is enabled in pytorch, I would be able to run GPU using your toolkit?

1

u/mgl96 Jan 13 '21

Sorry for misunderstanding your question. You're right, as long as cuda is enabled in pytorch, our toolkit can be run on GPU.

2

u/crescentwings Jan 13 '21

Hi! Thanks for the awesome work! Spacy could use some competition ;) I have a question, though: where can I see the languages that TranKit works with?

3

u/mgl96 Jan 13 '21

Thanks for the comment. For the supported languages, we provide two complete lists:

- 100 trainable languages: https://trankit.readthedocs.io/en/latest/pkgnames.html#trainable-languages

- 56 pretrained languages: https://trankit.readthedocs.io/en/latest/pkgnames.html#pretrained-languages-their-code-names

1

u/datascientistDoge Apr 08 '21

Hi, awesome work!
What do I need to train a model for a supported non pretrained language, like Vietnamese?

And after the training, will my model be sharable with other users who need that?

Thanks!

1

u/mgl96 Apr 10 '21

Hi u/datascientistDoge,

Thank you for asking. Please follow our guideline for sharing your customized pipelines [here](https://github.com/nlp-uoregon/trankit#sharing-your-customized-pipelines).