use pie-documents 0.1.0
Browse filesfrom https://github.com/ArneBinder/pie-datasets/pull/209 (and https://github.com/ArneBinder/pie-datasets/pull/211), also see https://github.com/ArneBinder/pie-documents/releases/tag/v0.1.0
- README.md +4 -4
- chemprot.py +2 -2
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -34,15 +34,15 @@ and the following annotation layers:
|
|
| 34 |
- `entities` (annotation type: `LabeledSpan`, target: `text`)
|
| 35 |
- `relations` (annotation type: `BinaryRelation`, target: `entities`)
|
| 36 |
|
| 37 |
-
See [here](https://github.com/ArneBinder/pie-
|
| 38 |
type definitions.
|
| 39 |
|
| 40 |
## Document Converters
|
| 41 |
|
| 42 |
The dataset provides predefined document converters for the following target document types:
|
| 43 |
|
| 44 |
-
- `
|
| 45 |
-
- `
|
| 46 |
|
| 47 |
-
See [here](https://github.com/ArneBinder/pie-
|
| 48 |
definitions.
|
|
|
|
| 34 |
- `entities` (annotation type: `LabeledSpan`, target: `text`)
|
| 35 |
- `relations` (annotation type: `BinaryRelation`, target: `entities`)
|
| 36 |
|
| 37 |
+
See [here](https://github.com/ArneBinder/pie-documents/blob/main/src/pie_documents/annotations.py) for the annotation
|
| 38 |
type definitions.
|
| 39 |
|
| 40 |
## Document Converters
|
| 41 |
|
| 42 |
The dataset provides predefined document converters for the following target document types:
|
| 43 |
|
| 44 |
+
- `pie_documents.documents.TextDocumentWithLabeledSpansAndBinaryRelations` for `ChemprotDocument`
|
| 45 |
+
- `pie_documents.documents.TextDocumentWithLabeledSpansBinaryRelationsAndLabeledPartitions` for `ChemprotBigbioDocument`
|
| 46 |
|
| 47 |
+
See [here](https://github.com/ArneBinder/pie-documents/blob/main/src/pie_documents/documents.py) for the document type
|
| 48 |
definitions.
|
chemprot.py
CHANGED
|
@@ -3,8 +3,8 @@ from typing import Any, Dict
|
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
from pie_core import Document
|
| 6 |
-
from
|
| 7 |
-
from
|
| 8 |
AnnotationLayer,
|
| 9 |
TextBasedDocument,
|
| 10 |
TextDocumentWithLabeledSpansAndBinaryRelations,
|
|
|
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
from pie_core import Document
|
| 6 |
+
from pie_documents.annotations import BinaryRelation, LabeledSpan
|
| 7 |
+
from pie_documents.documents import (
|
| 8 |
AnnotationLayer,
|
| 9 |
TextBasedDocument,
|
| 10 |
TextDocumentWithLabeledSpansAndBinaryRelations,
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
pie-datasets>=0.10.11,<0.12.0
|
| 2 |
-
pie-
|
|
|
|
| 1 |
pie-datasets>=0.10.11,<0.12.0
|
| 2 |
+
pie-documents>=0.1.0,<0.2.0
|