use pie-modules instead of pytorch-ie
Browse filessee https://github.com/ArneBinder/pie-datasets/pull/204 for further information
- requirements.txt +2 -2
- scientific_papers.py +3 -8
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
pie-datasets>=0.
|
| 2 |
-
pie-modules>=0.
|
|
|
|
| 1 |
+
pie-datasets>=0.10.11,<0.11.0
|
| 2 |
+
pie-modules>=0.15.9,<0.16.0
|
scientific_papers.py
CHANGED
|
@@ -2,13 +2,8 @@ import dataclasses
|
|
| 2 |
from typing import Any, Dict, List
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
-
from
|
| 6 |
-
|
| 7 |
-
AnnotationLayer,
|
| 8 |
-
AnnotationList,
|
| 9 |
-
annotation_field,
|
| 10 |
-
)
|
| 11 |
-
from pytorch_ie.documents import TextBasedDocument
|
| 12 |
|
| 13 |
from pie_datasets import GeneratorBasedBuilder
|
| 14 |
|
|
@@ -38,7 +33,7 @@ class ScientificPapersDocument(TextBasedDocument):
|
|
| 38 |
"""A PIE document for scientific papers dataset."""
|
| 39 |
|
| 40 |
abstract: AnnotationLayer[AbstractiveSummary] = annotation_field()
|
| 41 |
-
section_names:
|
| 42 |
|
| 43 |
|
| 44 |
def example_to_document(
|
|
|
|
| 2 |
from typing import Any, Dict, List
|
| 3 |
|
| 4 |
import datasets
|
| 5 |
+
from pie_core import Annotation, AnnotationLayer, annotation_field
|
| 6 |
+
from pie_modules.documents import TextBasedDocument
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
from pie_datasets import GeneratorBasedBuilder
|
| 9 |
|
|
|
|
| 33 |
"""A PIE document for scientific papers dataset."""
|
| 34 |
|
| 35 |
abstract: AnnotationLayer[AbstractiveSummary] = annotation_field()
|
| 36 |
+
section_names: AnnotationLayer[SectionName] = annotation_field()
|
| 37 |
|
| 38 |
|
| 39 |
def example_to_document(
|