DaCy is a Danish natural language preprocessing framework made with SpaCy. Its largest pipeline has achieved State-of-the-Art performance on Named entity recognition, part-of-speech tagging and dependency parsing for Danish. Feel free to try out the demo. This repository contains material for using DaCy, reproducing the results and guides on usage of the package. Furthermore, it also contains behavioural tests for biases and robustness of Danish NLP pipelines.
You can install dacy
via pip from PyPI:
pip install dacy
To use the model you first have to download either the small, medium, or large model. To see a list of all available models:
import dacy
for model in dacy.models():
print(model)
# ...
# da_dacy_small_trf-0.1.0
# da_dacy_medium_trf-0.1.0
# da_dacy_large_trf-0.1.0
To download and load a model simply execute:
nlp = dacy.load("da_dacy_medium_trf-0.1.0")
# or equivalently
nlp = dacy.load("medium")
Which will download the model to the .dacy
directory in your home directory.
To download the model to a specific directory:
dacy.download_model("da_dacy_medium_trf-0.1.0", your_save_path)
nlp = dacy.load_model("da_dacy_medium_trf-0.1.0", your_save_path)
To see more examples, see the documentation.
Documentation | |
---|---|
📚 Getting started | Guides and instructions on how to use DaCy and its features. |
🦾 Performance | A detailed description of the performance of DaCy and comparison with similar Danish models |
😎 Demo | A simple Streamlit demo to try out the augmenters. |
📰 News and changelog | New additions, changes and version history. |
🎛 API References | The detailed reference for DaCy's API. Including function documentation |
🙋 FAQ | Frequently asked questions |
Training and reproduction
The folder training
contains a range of folders with a SpaCy project for each model version. This allows for the reproduction of the results. The SpaCy project folders also include the evaluation metrics and scripts for acquiring the required data. For more information, please see the readme's in the respective training folders.
The folders include v0.0.0, v0.1.0, v0.1.1 and ner_fine_grained. The former 3 refer to the training of the main DaCy models, trained and evaluated on the DaNE dataset, whereas the latter contains the project for the fine-grained NER models trained on the DANSK dataset. Please refer to the available README's located within each training folder for more information.
Want to learn more about how DaCy initially came to be, check out this blog post.
To ask report issues or request features, please use the GitHub Issue Tracker. Questions related to SpaCy are kindly referred to the SpaCy GitHub or forum. Otherwise, please use the discussion Forums.
Type | |
---|---|
📚 FAQ | FAQ |
🚨 Bug Reports | GitHub Issue Tracker |
🎁 Feature Requests & Ideas | GitHub Issue Tracker |
👩💻 Usage Questions | GitHub Discussions |
🗯 General Discussion | GitHub Discussions |