Skip to content

Commit

Permalink
Merge pull request #75 from ArneBinder/add_token_documents_with_multi…
Browse files Browse the repository at this point in the history
…_spans

add token document types with multi spans
  • Loading branch information
ArneBinder authored Mar 4, 2024
2 parents dea7466 + af5d2b4 commit e3c8fb2
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/pie_modules/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,30 @@ class TextDocumentWithLabeledMultiSpansBinaryRelationsAndLabeledPartitions(
TextDocumentWithLabeledMultiSpansAndBinaryRelations,
):
pass


@dataclasses.dataclass
class TokenDocumentWithLabeledMultiSpans(TokenBasedDocument):
labeled_multi_spans: AnnotationLayer[LabeledMultiSpan] = annotation_field(target="tokens")


@dataclasses.dataclass
class TokenDocumentWithLabeledMultiSpansAndLabeledPartitions(
TokenDocumentWithLabeledMultiSpans, TokenDocumentWithLabeledPartitions
):
pass


@dataclasses.dataclass
class TokenDocumentWithLabeledMultiSpansAndBinaryRelations(TokenDocumentWithLabeledMultiSpans):
binary_relations: AnnotationLayer[BinaryRelation] = annotation_field(
target="labeled_multi_spans"
)


@dataclasses.dataclass
class TokenDocumentWithLabeledMultiSpansBinaryRelationsAndLabeledPartitions(
TokenDocumentWithLabeledMultiSpansAndLabeledPartitions,
TokenDocumentWithLabeledMultiSpansAndBinaryRelations,
):
pass

0 comments on commit e3c8fb2

Please sign in to comment.