Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,30 +1,114 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
- name: test
|
| 19 |
-
num_bytes: 132383487
|
| 20 |
-
num_examples: 150211
|
| 21 |
-
download_size: 548366122
|
| 22 |
-
dataset_size: 1323830472
|
| 23 |
-
configs:
|
| 24 |
-
- config_name: default
|
| 25 |
-
data_files:
|
| 26 |
-
- split: train
|
| 27 |
-
path: data/train-*
|
| 28 |
-
- split: test
|
| 29 |
-
path: data/test-*
|
| 30 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
language:
|
| 4 |
+
- sv
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
- token-classification
|
| 8 |
+
tags:
|
| 9 |
+
- swedish
|
| 10 |
+
- government-reports
|
| 11 |
+
- dependency-parsing
|
| 12 |
+
- universal-dependencies
|
| 13 |
+
- nlp
|
| 14 |
+
size_categories:
|
| 15 |
+
- 100K<n<1M
|
| 16 |
+
source_datasets:
|
| 17 |
+
- original
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
---
|
| 19 |
+
|
| 20 |
+
# SOU Corpus - Swedish Government Official Reports
|
| 21 |
+
|
| 22 |
+
Cleaned and dependency-parsed Swedish Government Official Reports (Statens offentliga utredningar) from 1994-2020.
|
| 23 |
+
|
| 24 |
+
## Dataset Description
|
| 25 |
+
|
| 26 |
+
This dataset contains sentence-segmented and dependency-parsed text from Swedish Government Official Reports. The original documents were cleaned, processed, and annotated with Universal Dependencies-style parsing.
|
| 27 |
+
|
| 28 |
+
### Fields
|
| 29 |
+
|
| 30 |
+
- **document_id**: Original document identifier (can be linked to Riksdagen open data)
|
| 31 |
+
- **text_type**: Type of text section
|
| 32 |
+
- `full_text`: Main report body
|
| 33 |
+
- `summary_swedish`: Standard Swedish summary
|
| 34 |
+
- `summary_simple_swedish`: Simple Swedish (lättläst) summary
|
| 35 |
+
- `summary_english`: English summary
|
| 36 |
+
- **section**: Section header from the document
|
| 37 |
+
- **text**: Plain text sentence
|
| 38 |
+
- **parsed**: Dependency-parsed sentence (token//POS//deprel//head format)
|
| 39 |
+
|
| 40 |
+
### Parsed Format
|
| 41 |
+
|
| 42 |
+
Each token in the `parsed` field follows the format:
|
| 43 |
+
```
|
| 44 |
+
word//POS_TAG//DEPENDENCY_RELATION//HEAD_INDEX
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Example:
|
| 48 |
+
```
|
| 49 |
+
Sverige//PM|NOM//nsubj//3 är//VB|PRS|AKT//cop//3 ett//DT|NEU|SIN|IND//det//3 land//NN|NEU|SIN|IND|NOM//ROOT//3
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Usage
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
from datasets import load_dataset
|
| 56 |
+
|
| 57 |
+
dataset = load_dataset("UppsalaNLP/sou-corpus")
|
| 58 |
+
|
| 59 |
+
# Access train/test splits
|
| 60 |
+
train = dataset["train"]
|
| 61 |
+
test = dataset["test"]
|
| 62 |
+
|
| 63 |
+
# Example
|
| 64 |
+
print(train[0]["text"])
|
| 65 |
+
print(train[0]["section"])
|
| 66 |
+
print(train[0]["text_type"])
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
### Extract Tokens
|
| 70 |
+
|
| 71 |
+
```python
|
| 72 |
+
def parse_tokens(parsed_str):
|
| 73 |
+
tokens = []
|
| 74 |
+
for t in parsed_str.split(' '):
|
| 75 |
+
parts = t.split('//')
|
| 76 |
+
if len(parts) >= 4:
|
| 77 |
+
tokens.append({
|
| 78 |
+
'word': parts[0],
|
| 79 |
+
'pos': parts[1],
|
| 80 |
+
'deprel': parts[2],
|
| 81 |
+
'head': int(parts[3]) if parts[3].isdigit() else 0
|
| 82 |
+
})
|
| 83 |
+
return tokens
|
| 84 |
+
|
| 85 |
+
tokens = parse_tokens(train[0]["parsed"])
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Source
|
| 89 |
+
|
| 90 |
+
Documents obtained from [Riksdagens öppna data](http://data.riksdagen.se). Original document URLs follow the pattern:
|
| 91 |
+
`https://data.riksdagen.se/dokument/{document_id}.html`
|
| 92 |
+
|
| 93 |
+
## Citation
|
| 94 |
+
|
| 95 |
+
```bibtex
|
| 96 |
+
@inproceedings{durlich-etal-2022-cause,
|
| 97 |
+
title = "Cause and Effect in Governmental Reports: Two Data Sets for Causality Detection in Swedish",
|
| 98 |
+
author = "D{\"u}rlich, Luise and Reimann, Sebastian and Finnveden, Gustav and Nivre, Joakim and Stymne, Sara",
|
| 99 |
+
booktitle = "Proceedings of the First Workshop on Natural Language Processing for Political Sciences",
|
| 100 |
+
month = jun,
|
| 101 |
+
year = "2022",
|
| 102 |
+
address = "Marseilles, France"
|
| 103 |
+
}
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
## License
|
| 107 |
+
|
| 108 |
+
This dataset is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
| 109 |
+
|
| 110 |
+
## Links
|
| 111 |
+
|
| 112 |
+
- [Uppsala NLP](https://huggingface.co/UppsalaNLP)
|
| 113 |
+
- [GitHub Repository](https://github.com/UppsalaNLP/SOU-corpus)
|
| 114 |
+
- [Riksdagen Open Data](http://data.riksdagen.se)
|