Skip to main content
QUICK REVIEW

[Paper Review] DaCy: A Unified Framework for Danish NLP

Kenneth Enevoldsen, Lasse Hansen|arXiv (Cornell University)|Jul 12, 2021
Natural Language Processing TechniquesComputer Science21 references6 citations
TL;DR

DaCy introduces a unified, state-of-the-art framework for Danish NLP built on SpaCy, integrating fine-tuned models for POS tagging, named entity recognition (NER), and dependency parsing. It achieves SOTA performance and enhanced robustness through data augmentation, revealing critical biases and failure modes—especially under spelling variations and casing changes—while providing tools for model evaluation and integration.

ABSTRACT

Danish natural language processing (NLP) has in recent years obtained considerable improvements with the addition of multiple new datasets and models. However, at present, there is no coherent framework for applying state-of-the-art models for Danish. We present DaCy: a unified framework for Danish NLP built on SpaCy. DaCy uses efficient multitask models which obtain state-of-the-art performance on named entity recognition, part-of-speech tagging, and dependency parsing. DaCy contains tools for easy integration of existing models such as for polarity, emotion, or subjectivity detection. In addition, we conduct a series of tests for biases and robustness of Danish NLP pipelines through augmentation of the test set of DaNE. DaCy large compares favorably and is especially robust to long input lengths and spelling variations and errors. All models except DaCy large display significant biases related to ethnicity while only Polyglot shows a significant gender bias. We argue that for languages with limited benchmark sets, data augmentation can be particularly useful for obtaining more realistic and fine-grained performance estimates. We provide a series of augmenters as a first step towards a more thorough evaluation of language models for low and medium resource languages and encourage further development.

Motivation & Objective

  • To address the lack of a coherent, efficient, and state-of-the-art framework for Danish NLP that unifies core tasks like POS tagging, NER, and dependency parsing.
  • To improve model accessibility and integration by building on SpaCy v3, enabling seamless pipeline composition with existing models for sentiment, emotion, and subjectivity classification.
  • To evaluate Danish NLP models beyond standard benchmarks by introducing data augmentation to simulate real-world text variations such as spelling errors, casing changes, and name substitutions.
  • To identify and expose critical performance weaknesses—especially biases related to ethnicity and gender—under realistic data perturbations.
  • To promote transparency and robustness in low-resource NLP by providing open-source augmenters and evaluation tools for future model development.

Proposed method

  • Fine-tuned three multilingual and monolingual language models—DaCy small (Danish Electra), DaCy medium (Danish BERT), and DaCy large (XLM-RoBERTa)—on the DaNE dataset for joint POS, NER, and dependency parsing in a single forward pass.
  • Integrated the models into a unified SpaCy-based pipeline, enabling efficient inference and extensibility through utility functions for wrapping HuggingFace Transformers models.
  • Designed and applied a suite of data augmenters to generate realistic test variations, including spelling errors (keystroke errors), case transformations (lowercasing), name substitutions (e.g., Muslim names), and character-level manipulations.
  • Evaluated model performance on both original and augmented test sets to measure robustness, with results analyzed per task and model size.
  • Used bootstrapping and statistical testing to assess significance of performance differences across models and augmentations.
  • Provided open-source augmenters and evaluation utilities within the DaCy library to support reproducible and transparent model evaluation.

Experimental results

Research questions

  • RQ1How can a unified, efficient, and state-of-the-art framework be built for Danish NLP that supports core tasks like POS tagging, NER, and dependency parsing with minimal user friction?
  • RQ2To what extent do existing Danish NLP models generalize to real-world text variations such as spelling errors, non-standard casing, and name substitutions?
  • RQ3Which model architectures and pre-training strategies exhibit superior robustness to data augmentations in low-resource settings like Danish NLP?
  • RQ4What biases—particularly related to ethnicity and gender—are present in Danish NLP models, and how do they manifest under data augmentation?
  • RQ5Can data augmentation serve as a practical and informative method for evaluating model robustness and guiding model selection in low- and medium-resource NLP?

Key findings

  • DaCy models achieve state-of-the-art performance on POS tagging, NER, and dependency parsing on the DaNE benchmark, with DaCy large outperforming all others across all tasks.
  • DaCy large demonstrates superior robustness to input variations, especially long input lengths and spelling errors, outperforming even larger models like DaNLP’s BERT and NERDA.
  • All models except DaCy large show significant performance degradation on Muslim names compared to Danish names, indicating a strong ethnic bias in model generalization.
  • Casing significantly affects performance: cased models like Flair, SpaCy, and DaCy small/large suffer substantial NER degradation under lowercasing, while uncased models (e.g., DaNLP’s BERT) remain stable.
  • Spelling variations (e.g., æ, ø, å) and character-level errors reduce performance across all models, with DaCy small showing better resilience than larger models due to curated training data.
  • Only Polyglot and DaCy models (except large) exhibit significant gender bias, while ethnicity-related bias is widespread, highlighting the need for more nuanced evaluation in low-resource NLP.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.