add example usage for brat script
Browse files
README.md
CHANGED
|
@@ -18,6 +18,7 @@ task_ids:
|
|
| 18 |
- [Dataset Structure](#dataset-structure)
|
| 19 |
- [Data Instances](#data-instances)
|
| 20 |
- [Data Fields](#data-instances)
|
|
|
|
| 21 |
- [Additional Information](#additional-information)
|
| 22 |
- [Licensing Information](#licensing-information)
|
| 23 |
- [Citation Information](#citation-information)
|
|
@@ -51,6 +52,35 @@ Dataset annotated with brat format is processed using this script. Annotations c
|
|
| 51 |
-notes:
|
| 52 |
```
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
## Additional Information
|
| 56 |
|
|
|
|
| 18 |
- [Dataset Structure](#dataset-structure)
|
| 19 |
- [Data Instances](#data-instances)
|
| 20 |
- [Data Fields](#data-instances)
|
| 21 |
+
- [Usage](#usage)
|
| 22 |
- [Additional Information](#additional-information)
|
| 23 |
- [Licensing Information](#licensing-information)
|
| 24 |
- [Citation Information](#citation-information)
|
|
|
|
| 52 |
-notes:
|
| 53 |
```
|
| 54 |
|
| 55 |
+
### Usage
|
| 56 |
+
|
| 57 |
+
brat script can be used by calling `load_dataset()` method and passing `kwargs` (arguments to the [BuilderConfig](https://huggingface.co/docs/datasets/v2.2.1/en/package_reference/builder_classes#datasets.BuilderConfig)) which should include at least `url` of the dataset prepared using brat. We provide an example of [SciArg](https://aclanthology.org/W18-5206.pdf) dataset below,
|
| 58 |
+
|
| 59 |
+
```python
|
| 60 |
+
from datasets import load_dataset
|
| 61 |
+
kwargs = {
|
| 62 |
+
"description" :
|
| 63 |
+
"""This dataset is an extension of the Dr. Inventor corpus (Fisas et al., 2015, 2016) with an annotation layer containing
|
| 64 |
+
fine-grained argumentative components and relations. It is the first argument-annotated corpus of scientific
|
| 65 |
+
publications (in English), which allows for joint analyses of argumentation and other rhetorical dimensions of
|
| 66 |
+
scientific writing.""",
|
| 67 |
+
"citation" :
|
| 68 |
+
"""@inproceedings{lauscher2018b,
|
| 69 |
+
title = {An argument-annotated corpus of scientific publications},
|
| 70 |
+
booktitle = {Proceedings of the 5th Workshop on Mining Argumentation},
|
| 71 |
+
publisher = {Association for Computational Linguistics},
|
| 72 |
+
author = {Lauscher, Anne and Glava\v{s}, Goran and Ponzetto, Simone Paolo},
|
| 73 |
+
address = {Brussels, Belgium},
|
| 74 |
+
year = {2018},
|
| 75 |
+
pages = {40–46}
|
| 76 |
+
}""",
|
| 77 |
+
"homepage": "https://github.com/anlausch/ArguminSci",
|
| 78 |
+
"url": "http://data.dws.informatik.uni-mannheim.de/sci-arg/compiled_corpus.zip",
|
| 79 |
+
"file_name_blacklist": ['A28'],
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
dataset = load_dataset('dfki-nlp/brat', **kwargs)
|
| 83 |
+
```
|
| 84 |
|
| 85 |
## Additional Information
|
| 86 |
|