siimh's picture
Add a cleaned version of the original dataset, with morphological tags removed, leaving only the plain text
b2839ef
# Estonian National Corpus 2021: Morphologically Tagged and Clean Text
## Dataset Summary
This repository contains two versions of the **Estonian National Corpus 2021**, representing around **43GB of data** and **millions of sentences** annotated with **morphological features**. This corpus is designed to be useful for:
- **Morphological analysis**.
- **Natural language understanding** for **Estonian**.
Both files in this dataset originate from the **Estonian National Corpus (ENC) 2021** and have been processed for different use cases:
1. **`corpus_et.jsonl`**: Contains **morphologically tagged text** where each word is annotated with its base lemma and morphological features (e.g., case, number, tense).
2. **`corpus_et_clean.jsonl`**: A **cleaned version** of the original dataset, with **morphological tags removed**, leaving only the plain text.
These datasets can be used for fine-tuning **language models** or studying **morphological patterns** and **syntactic structures** in the Estonian language.
---
## Files in This Dataset:
- **`corpus_et.jsonl`**: This file contains text with **morphological annotations**, where each word is followed by a tag indicating its grammatical properties (e.g., `Vabadus_vabadus-s`).
The fields in this file are as follows:
- **`text`** (string): A sentence where each word is attached to its morphological tag. Example:
```json
{"text": "Vabadus_vabadus-s millest_mis-p ilmselt_ilmselt-d ei_ei-v."}
```
- **`corpus_et_clean.jsonl`**: This file contains the **same sentences** as `corpus_et.jsonl` but with the **morphological tags stripped**. It is clean text suitable for general **language fine-tuning**, without the added complexity of morph tags.
The fields in this file are as follows:
- **`text`** (string): A plain-text sentence, with the same meaning as the original tagged version. Example:
```json
{"text": "Vabadus millest ilmselt ei."}
```
---
## Dataset Structure
- Both datasets are in JSONL (newline-delimited JSON) format.
- The datasets do not contain explicit **train/validation splits**, meaning users can split them according to their needs.
- Each line is a JSON object consisting of the `"text"` field for the sentence.
---
## Use Cases
This dataset is highly versatile and could be used in multiple **natural language processing (NLP) tasks**, such as:
1. **Tagging and Morphological Parsing**: Use the **tagged version** (`corpus_et.jsonl`) to train models that focus on **morphological understanding** or performing **syntax parsing** for Estonian.
2. **General Language Modeling**: Use the **cleaned version** (`corpus_et_clean.jsonl`) to train **general-purpose Estonian language models** for tasks like **text generation** or **machine translation**.
3. **Inflection Modeling**: The tagged data can also serve as a training set for **inflection generation models** that learn to correctly inflect Estonian words based on grammatical context.
---
## Dataset Statistics
The dataset has the following statistics (for both `corpus_et.jsonl` and `corpus_et_clean.jsonl`):
- **Total size**: ~43GB
- **Sentences**: Approx. **196 million** sentences
- **Words**: Approx. **2.4 billion** words
- **Documents**: Approx. **11.7 million** documents
- **Paragraphs**: Approx. **64.5 million** paragraphs
---
## Examples
### Example from `corpus_et.jsonl` (Tagged Text):
```json
{
"text": "Vabadus_vabadus-s millest_mis-p ilmselt_ilmselt-d ei_ei-v."
}
```
### Example from `corpus_et_clean.jsonl` (Clean Text):
```json
{
"text": "Vabadus millest ilmselt ei."
}
```
---
## Dataset Creation
The dataset was derived from the **Estonian National Corpus 2021** and processed into these two versions:
1. **Tagged JSONL** (`corpus_et.jsonl`): This version contains **morphologically annotated text** based on the original corpus.
2. **Clean JSONL** (`corpus_et_clean.jsonl`): This version contains the same text but without the **morphological tags**—resulting in clean, plain-text sentences.
---
## License
This dataset is made available under the **Creative Commons Attribution License (CC-BY)**, allowing free use and sharing with proper attribution to the authors listed below.
---
## Citation
If you use this dataset, please cite the authors of the original **Estonian National Corpus 2021**:
```plaintext
Koppel, Kristina; Kallas, Jelena (2022). Eesti keele ühendkorpus 2021. DOI: 10.15155/3-00-0000-0000-0000-08E60L
```
Please also give credit to this dataset repository when used in a project:
```plaintext
@dataset{siimh_estonian_corpus_2021,
author = {Siim Haugas},
title = {Estonian National Corpus 2021: Tagged and Cleaned Versions},
year = {2023},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/siimh/estonian_corpus_2021}
}
```
---
## Contact
For any inquiries regarding this dataset or data processing, feel free to contact:
- **Siim Haugas**
- Hugging Face profile: [https://huggingface.co/siimh](https://huggingface.co/siimh)
---
## How to Load the Dataset
You can load the dataset directly from Hugging Face with the **datasets** library.
### For the Tagged Version (`corpus_et.jsonl`):
```python
from datasets import load_dataset
# Load the tagged dataset
dataset = load_dataset("siimh/estonian_corpus_2021", data_files="corpus_et.jsonl")
```
### For the Cleaned Version (`corpus_et_clean.jsonl`):
```python
from datasets import load_dataset
# Load the clean dataset
dataset = load_dataset("siimh/estonian_corpus_2021", data_files="corpus_et_clean.jsonl")
```
---
### Conclusion
This dataset is a powerful resource for fine-tuning Estonian-language models, improving **morphological awareness**, and supporting natural language processing tasks. Whether you're training a **language model**, working on **syntactic parsing**, or preparing for a Estonian **chatbot**, this dataset will provide excellent material for various NLP tasks.