Open-Source Tools for Morphology, Lemmatization, POS Tagging and Named Entity Recognition
Summary
The paper presents two open-source toolkits from Charles University in Prague. They address the lack of freely available, end-to-end taggers and named entity recognizers for morphologically rich languages, Czech in particular. MorphoDiTa handles tokenization, morphological analysis with lemmatization, morphological generation and POS tagging. Its dictionary groups shared word endings into "templates," and its tagger is an averaged perceptron that follows the Morče/Featurama line of work (Spoustová et al., 2009). NameTag recognizes named entities with a Maximum Entropy Markov Model, a reimplementation of Straková et al. (2013). It is trained on the Czech Named Entity Corpus.
Both tools match or come close to the best published Czech results while using far less memory and running much faster than earlier systems. MorphoDiTa also reaches near state-of-the-art accuracy on English (Penn Treebank). Either tool can be retrained for any language that has annotated data. They ship under LGPL as standalone programs, C++ libraries with Java/Python/Perl bindings and web services, with Czech models under CC BY-NC-SA. This makes them a practical, dependency-free baseline for Slavic NLP.
Key points
- Dictionary compression: Czech Morfflex contains 120M form–tag pairs from 1M lemmas, 3 922 tags and 6.7GB of data. With an ending length of N = 8, it is reduced to 7 080 templates and 3M template instances, giving a 2MB binary that is about 3 000 times smaller. The dictionary supports about 500K lookups per second.
- Czech tagging (PDT 2.5):
- Full tags: 95.75% accuracy, against 95.67% for Morče and 95.66% for Featurama.
- Lemmas: 97.80%.
- Lemma plus tag: 95.03%.
- Reduced 2-position (POS + sub-POS) tags: 99.18%.
- English tagging (WSJ): 97.27% accuracy, against 97.33% for Shen et al. (2007).
- Speed and resources:
- MorphoDiTa, full Czech tags: about 10K words/s, 52MB RAM and a 16MB model. Morče needs 902MB RAM and a 178MB model at about 1K words/s.
- MorphoDiTa, 2-position Czech tags: about 200K words/s with 15MB RAM.
- NameTag: about 40–45K words/s with 54–65MB RAM and 3–4MB models.
- NameTag accuracy:
- CNEC 1.1: F-measure 81.01 for 7 classes and 77.88 for 42 classes, slightly below Straková et al. (2013) at 82.82 and 79.23.
- CNEC 2.0: F-measure 80.30 for 7 classes and 77.22 for 42 classes.
Interesting ideas
- I1. Learning inflection templates without linguistic rules. Build a trie of each lemma's forms. Choose a stem node that keeps the endings at most N characters long while making the stem as long as possible. Reuse identical ending sets across lemmas. This could compress large Ukrainian form lists into a small, fast analyzer.
- I2. Tuning N as a size trade-off. Too few templates means each lemma needs many template instances, while too many templates makes the template table itself large. The parameter is worth tuning explicitly whenever a lexicon is encoded this way.
- I3. Separating candidate generation from disambiguation. The dictionary proposes every plausible lemma–tag pair, and the tagger only chooses among them. This keeps the classifier's search space small, even when the tagset contains thousands of tags.
- I4. Offering a reduced tagset model. A model restricted to POS and sub-POS gives much higher accuracy and roughly 20× higher speed. It is a useful option for applications that do not need features such as case.
- I5. Reporting efficiency next to accuracy. The authors report throughput, RAM and model size alongside accuracy, and they evaluate NER at both class-hierarchy levels. This exposes trade-offs that accuracy tables alone hide, which matters when choosing tools for production.
Cite
@inproceedings{strakova2014open,
title = {{Open-Source Tools for Morphology, Lemmatization, POS Tagging and Named Entity Recognition}},
author = {Straková, Jana and Straka, Milan and Hajič, Jan},
booktitle = {Proceedings of 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations},
year = {2014},
doi = {10.3115/v1/p14-5003},
url = {https://doi.org/10.3115/v1/p14-5003}
}References
- Rie Kubota Ando and Tong Zhang. 2005. A high-performance semi-supervised learning method for text chunking. In Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, ACL ’05, pages 1–9. Association for Computational Linguistics. find
- Eduard Bejček, Jarmila Panevová, Jan Popelka, Pavel Straňák, Magda Ševčı́ková, Jan Štěpánek, and Zdeněk Žabokrtský. 2012. Prague Dependency Treebank 2.5 – a revisited version of PDT 2.0. In Martin Kay and Christian Boitet, editors, Proceedings of the 24th International Conference on Com… find
- IIT Bombay, Coling 2012 Organizing Committee. find
- Thorsten Brants. 2000. TnT: A Statistical Part-of-speech Tagger. In Proceedings of the Sixth Conference on Applied Natural Language Processing, ANLC ’00, pages 224–231, Stroudsburg, PA, USA. Association for Computational Linguistics. find our card
- Eric Brill. 1992. A Simple Rule-based Part of Speech Tagger. In Proceedings of the Third Conference on Applied Natural Language Processing, ANLC ’92, pages 152–155, Stroudsburg, PA, USA. Association for Computational Linguistics. find our card
- Nancy A. Chinchor. 1998. Proceedings of the Seventh Message Understanding Conference (MUC-7) Named Entity Task Definition. In Proceedings of the Seventh Message Understanding Conference (MUC-7), page 21 pages, April. find
- Michael Collins. 2002. Discriminative Training Methods for Hidden Markov Models: Theory and Experiments with Perceptron Algorithms. In Proceedings of the 2002 Conference on Empirical Methods in Natural Language Processing, pages 1–8. Association for Computational Linguistics, July. find our card
- Rene De La Briandais. 1959. File Searching Using Variable Length Keys. In Papers Presented at the the March 3-5, 1959, Western Joint Computer Conference, IRE-AIEE-ACM ’59 (Western), pages 295– 298, New York, NY, USA. ACM. find
- Jenny Rose Finkel, Trond Grenager, and Christopher Manning. 2005. Incorporating non-local information into information extraction systems by Gibbs sampling. In Proceedings of the 43rd Annual Meeting on Association for Computational Linguistics, ACL ’05, pages 363–370. Association for Computational L… find our card
- J. Hajič. 2004. Disambiguation of Rich Inflection: Computational Morphology of Czech. Karolinum Press. find
- Donald Knuth, 1997. The Art of Computer Programming, Volume 3: Sorting and Searching, Third Edition, chapter Section 6.3: Digital Searching, pages 492–512. Addison-Wesley. find
- Michal Konkol and Miloslav Konopı́k. 2011. Maximum Entropy Named Entity Recognition for Czech Language. In Text, Speech and Dialogue, volume 6836 of Lecture Notes in Computer Science, pages 203–210. Springer Berlin Heidelberg. find
- Michal Konkol and Miloslav Konopı́k. 2013. CRF-Based Czech Named Entity Recognizer and Consolidation of Czech NER Research. In Ivan Habernal and Vclav Matouek, editors, Text, Speech, and Dialogue, volume 8082 of Lecture Notes in Computer Science, pages 153–160. Springer Berlin Heidelberg. find
- Jana Kravalová and Zdeněk Žabokrtský. 2009. Czech named entity corpus and SVM-based recognizer. In Proceedings of the 2009 Named Entities Workshop: Shared Task on Transliteration, NEWS ’09, pages 194–201. Association for Computational Linguistics. find
- H. Kucera and W. N. Francis. 1967. Computational analysis of present-day American English. Brown University Press, Providence, RI. find
- Mitchell P. Marcus, Beatrice Santorini, and Mary Ann Marcinkiewicz. 1993. Building a Large Annotated Corpus of English: The Penn Treebank. COMPU-TATIONAL LINGUISTICS, 19(2):313–330. find our card
- Lev Ratinov and Dan Roth. 2009. Design challenges and misconceptions in named entity recognition. In CoNLL ’09: Proceedings of the Thirteenth Conference on Computational Natural Language Learning, pages 147–155. Association for Computational Linguistics. find our card
- Libin Shen, Giorgio Satta, and Aravind Joshi. 2007. Guided Learning for Bidirectional Sequence Classification. In Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics, pages 760–767, Prague, Czech Republic, June. Association for Computational Linguistics. find
- Drahomı́ra “johanka” Spoustová, Jan Hajič, Jan Raab, and Miroslav Spousta. 2009. Semi-Supervised Training for the Averaged Perceptron POS Tagger. In Proceedings of the 12th Conference of the European Chapter of the ACL (EACL 2009), pages 763– 771, Athens, Greece, March. Association for Computation… find
- Jana Straková, Milan Straka, and Jan Hajič. 2013. A New State-of-The-Art Czech Named Entity Recognizer. In Ivan Habernal and Václav Matoušek, editors, Text, Speech and Dialogue: 16th International Conference, TSD 2013. Proceedings, volume 8082 of Lecture Notes in Computer Science, pages 68–75, B… find
- Jun Suzuki and Hideki Isozaki. 2008. Semi-Supervised Sequential Labeling and Segmentation using Giga-word Scale Unlabeled Data. Computational Linguistics, (June):665–673. find
- Erik F. Tjong Kim Sang and Fien De Meulder. 2003. Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition. In Proceedings of CoNLL-2003, pages 142– 147. Edmonton, Canada. find our card
- Magda Ševčı́ková, Zdeněk Žabokrtský, and Oldřich Krůza. 2007. Named entities in Czech: annotating data and developing NE tagger. In Proceedings of the 10th international conference on Text, speech and dialogue, TSD’07, pages 188–195. Springer-Verlag. find
This page in Markdown → https://md.research.elamur.ai/free/en/papers/strakova-2014-open-source-tools-morphology-lemmatization/