use pie-modules instead of pytorch-ie
Browse filessee https://github.com/ArneBinder/pie-datasets/pull/204 for further information
- README.md +15 -14
- abstrct.py +1 -1
- requirements.txt +2 -1
README.md
CHANGED
|
@@ -15,14 +15,14 @@ in order to support clinicians' daily tasks in information finding and evidence-
|
|
| 15 |
```python
|
| 16 |
from pie_datasets import load_dataset
|
| 17 |
from pie_datasets.builders.brat import BratDocumentWithMergedSpans
|
| 18 |
-
from
|
| 19 |
|
| 20 |
# load default version
|
| 21 |
dataset = load_dataset("pie/abstrct")
|
| 22 |
assert isinstance(dataset["neoplasm_train"][0], BratDocumentWithMergedSpans)
|
| 23 |
|
| 24 |
# if required, normalize the document type (see section Document Converters below)
|
| 25 |
-
dataset_converted = dataset.to_document_type("
|
| 26 |
assert isinstance(dataset_converted["neoplasm_train"][0], TextDocumentWithLabeledSpansAndBinaryRelations)
|
| 27 |
|
| 28 |
# get first relation in the first document
|
|
@@ -57,13 +57,13 @@ See [PIE-Brat Data Schema](https://huggingface.co/datasets/pie/brat#data-schema)
|
|
| 57 |
|
| 58 |
The dataset provides document converters for the following target document types:
|
| 59 |
|
| 60 |
-
- `
|
| 61 |
- `LabeledSpans`, converted from `BratDocumentWithMergedSpans`'s `spans`
|
| 62 |
- labels: `MajorClaim`, `Claim`, `Premise`
|
| 63 |
- `BinraryRelations`, converted from `BratDocumentWithMergedSpans`'s `relations`
|
| 64 |
-
- labels:
|
| 65 |
|
| 66 |
-
See [here](https://github.com/
|
| 67 |
|
| 68 |
### Data Splits
|
| 69 |
|
|
@@ -93,7 +93,7 @@ Morio et al. ([2022](https://aclanthology.org/2022.tacl-1.37.pdf); p. 642, Table
|
|
| 93 |
|
| 94 |
- `MajorClaim` are more general/concluding `claim`'s, which is supported by more specific claims
|
| 95 |
- `Claim` is a concluding statement made by the author about the outcome of the study. Claims only points to other claims.
|
| 96 |
-
- `Premise` (a.k.a. evidence)
|
| 97 |
|
| 98 |
(Mayer et al. 2020, p.2110)
|
| 99 |
|
|
@@ -118,7 +118,8 @@ Morio et al. ([2022](https://aclanthology.org/2022.tacl-1.37.pdf); p. 642, Table
|
|
| 118 |
|
| 119 |
#### Example
|
| 120 |
|
| 121 |
-
, and [bert-based-uncased](https://huggingface.co/bert-base-uncased) to tokenize `text` in `TextDocumentWithLabeledSpansAndBinaryRelations` (see [document type](https://github.com/
|
| 145 |
|
| 146 |
#### Relation argument (outer) token distance per label
|
| 147 |
|
|
@@ -354,7 +355,7 @@ python src/evaluate_documents.py dataset=abstrct_base metric=count_text_tokens
|
|
| 354 |
|
| 355 |
### Curation Rationale
|
| 356 |
|
| 357 |
-
"
|
| 358 |
of text, and their contribution is limited to the detection
|
| 359 |
of argument components, disregarding the more complex phase of
|
| 360 |
predicting the relations among them. In addition, no huge annotated
|
|
@@ -373,7 +374,7 @@ Extended from the previous dataset in [Mayer et al. 2018](https://webusers.i3s.u
|
|
| 373 |
|
| 374 |
#### Who are the source language producers?
|
| 375 |
|
| 376 |
-
|
| 377 |
|
| 378 |
### Annotations
|
| 379 |
|
|
@@ -405,7 +406,7 @@ Two annotators with background in computational linguistics. No information was
|
|
| 405 |
|
| 406 |
### Personal and Sensitive Information
|
| 407 |
|
| 408 |
-
|
| 409 |
|
| 410 |
## Considerations for Using the Data
|
| 411 |
|
|
@@ -426,17 +427,17 @@ scale." (p. 2114)
|
|
| 426 |
|
| 427 |
### Discussion of Biases
|
| 428 |
|
| 429 |
-
|
| 430 |
|
| 431 |
### Other Known Limitations
|
| 432 |
|
| 433 |
-
|
| 434 |
|
| 435 |
## Additional Information
|
| 436 |
|
| 437 |
### Dataset Curators
|
| 438 |
|
| 439 |
-
|
| 440 |
|
| 441 |
### Licensing Information
|
| 442 |
|
|
|
|
| 15 |
```python
|
| 16 |
from pie_datasets import load_dataset
|
| 17 |
from pie_datasets.builders.brat import BratDocumentWithMergedSpans
|
| 18 |
+
from pie_modules.documents import TextDocumentWithLabeledSpansAndBinaryRelations
|
| 19 |
|
| 20 |
# load default version
|
| 21 |
dataset = load_dataset("pie/abstrct")
|
| 22 |
assert isinstance(dataset["neoplasm_train"][0], BratDocumentWithMergedSpans)
|
| 23 |
|
| 24 |
# if required, normalize the document type (see section Document Converters below)
|
| 25 |
+
dataset_converted = dataset.to_document_type("pie_modules.documents.TextDocumentWithLabeledSpansAndBinaryRelations")
|
| 26 |
assert isinstance(dataset_converted["neoplasm_train"][0], TextDocumentWithLabeledSpansAndBinaryRelations)
|
| 27 |
|
| 28 |
# get first relation in the first document
|
|
|
|
| 57 |
|
| 58 |
The dataset provides document converters for the following target document types:
|
| 59 |
|
| 60 |
+
- `pie_modules.documents.TextDocumentWithLabeledSpansAndBinaryRelations`
|
| 61 |
- `LabeledSpans`, converted from `BratDocumentWithMergedSpans`'s `spans`
|
| 62 |
- labels: `MajorClaim`, `Claim`, `Premise`
|
| 63 |
- `BinraryRelations`, converted from `BratDocumentWithMergedSpans`'s `relations`
|
| 64 |
+
- labels: `Support`, `Partial-Attack`, `Attack`
|
| 65 |
|
| 66 |
+
See [here](https://github.com/ArneBinder/pie-modules/blob/main/src/pie_modules/documents.py) for the document type definitions.
|
| 67 |
|
| 68 |
### Data Splits
|
| 69 |
|
|
|
|
| 93 |
|
| 94 |
- `MajorClaim` are more general/concluding `claim`'s, which is supported by more specific claims
|
| 95 |
- `Claim` is a concluding statement made by the author about the outcome of the study. Claims only points to other claims.
|
| 96 |
+
- `Premise` (a.k.a. evidence) is an observation or measurement in the study, which supports or attacks another argument component, usually a `claim`. They are observed facts, and therefore credible without further justifications, as this is the ground truth the argumentation is based on.
|
| 97 |
|
| 98 |
(Mayer et al. 2020, p.2110)
|
| 99 |
|
|
|
|
| 118 |
|
| 119 |
#### Example
|
| 120 |
|
| 121 |
+

|
| 122 |
+

|
| 123 |
|
| 124 |
### Collected Statistics after Document Conversion
|
| 125 |
|
|
|
|
| 142 |
revision: 277dc703fd78614635e86fe57c636b54931538b2
|
| 143 |
```
|
| 144 |
|
| 145 |
+
For token based metrics, this uses `bert-base-uncased` from `transformer.AutoTokenizer` (see [AutoTokenizer](https://huggingface.co/docs/transformers/v4.37.1/en/model_doc/auto#transformers.AutoTokenizer), and [bert-based-uncased](https://huggingface.co/bert-base-uncased) to tokenize `text` in `TextDocumentWithLabeledSpansAndBinaryRelations` (see [document type](https://github.com/ArneBinder/pie-modules/blob/main/src/pie_modules/documents.py)).
|
| 146 |
|
| 147 |
#### Relation argument (outer) token distance per label
|
| 148 |
|
|
|
|
| 355 |
|
| 356 |
### Curation Rationale
|
| 357 |
|
| 358 |
+
"[D]espite its natural employment in healthcare applications, only few approaches have applied AM methods to this kind
|
| 359 |
of text, and their contribution is limited to the detection
|
| 360 |
of argument components, disregarding the more complex phase of
|
| 361 |
predicting the relations among them. In addition, no huge annotated
|
|
|
|
| 374 |
|
| 375 |
#### Who are the source language producers?
|
| 376 |
|
| 377 |
+
[More Information Needed]
|
| 378 |
|
| 379 |
### Annotations
|
| 380 |
|
|
|
|
| 406 |
|
| 407 |
### Personal and Sensitive Information
|
| 408 |
|
| 409 |
+
[More Information Needed]
|
| 410 |
|
| 411 |
## Considerations for Using the Data
|
| 412 |
|
|
|
|
| 427 |
|
| 428 |
### Discussion of Biases
|
| 429 |
|
| 430 |
+
[More Information Needed]
|
| 431 |
|
| 432 |
### Other Known Limitations
|
| 433 |
|
| 434 |
+
[More Information Needed]
|
| 435 |
|
| 436 |
## Additional Information
|
| 437 |
|
| 438 |
### Dataset Curators
|
| 439 |
|
| 440 |
+
[More Information Needed]
|
| 441 |
|
| 442 |
### Licensing Information
|
| 443 |
|
abstrct.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
from
|
| 2 |
|
| 3 |
from pie_datasets.builders import BratBuilder, BratConfig
|
| 4 |
from pie_datasets.builders.brat import BratDocumentWithMergedSpans
|
|
|
|
| 1 |
+
from pie_modules.documents import TextDocumentWithLabeledSpansAndBinaryRelations
|
| 2 |
|
| 3 |
from pie_datasets.builders import BratBuilder, BratConfig
|
| 4 |
from pie_datasets.builders.brat import BratDocumentWithMergedSpans
|
requirements.txt
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
pie-datasets>=0.
|
|
|
|
|
|
| 1 |
+
pie-datasets>=0.10.11,<0.11.0
|
| 2 |
+
pie-modules>=0.15.9,<0.16.0
|