-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multi span handling for sciarg
#103
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
+ Coverage 95.23% 95.55% +0.31%
==========================================
Files 22 22
Lines 1407 1439 +32
==========================================
+ Hits 1340 1375 +35
+ Misses 67 64 -3 ☔ View full report in Codecov by Sentry. |
… to tests.dataset_builders.common
…s and TextDocumentWithLabeledMultiSpansBinaryRelationsAndLabeledPartitions to sciarg
ArneBinder
force-pushed
the
sciarg_multi_span_handling
branch
from
February 20, 2024 10:54
a599403
to
e1f8bc7
Compare
…on_converter_pipeline_steps_with_resolve_parts_of_same() (requires pie-modules 0.10.8)
…lt relation count
ArneBinder
changed the title
multi span handling for
multi span handling for Mar 4, 2024
sciarg
[WIP]sciarg
Label counts statisticsEDIT: adjusted for counts calculated with latest commit e2698bc dataset variant
|
len | max | sum | |
---|---|---|---|
background_claim | 40 | 182 | 3291 |
data | 40 | 214 | 4297 |
own_claim | 40 | 285 | 6004 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_entity_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=default \
metric.document_type=pie_datasets.builders.brat.BratDocumentWithMergedSpans \
metric.field=spans
len | max | sum | |
---|---|---|---|
contradicts | 40 | 37 | 696 |
parts_of_same | 40 | 100 | 1298 |
semantically_same | 18 | 9 | 44 |
supports | 40 | 300 | 5789 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_relation_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=default \
metric.document_type=pie_datasets.builders.brat.BratDocumentWithMergedSpans \
metric.field=relations
document type TextDocumentWithLabeledSpansAndBinaryRelations
len | max | sum | |
---|---|---|---|
background_claim | 40 | 182 | 3291 |
data | 40 | 214 | 4297 |
own_claim | 40 | 285 | 6004 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_entity_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=default \
metric.document_type=pie_modules.documents.TextDocumentWithLabeledSpansAndBinaryRelations \
metric.field=labeled_spans
len | max | sum | |
---|---|---|---|
contradicts | 40 | 37 | 696 |
parts_of_same | 40 | 100 | 1298 |
semantically_same | 18 | 9 | 44 |
supports | 40 | 300 | 5789 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_relation_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=default \
metric.document_type=pie_modules.documents.TextDocumentWithLabeledSpansAndBinaryRelations \
metric.field=binary_relations
dataset variant resolve_parts_of_same
document type BratDocument
i.e. no conversion
len | max | sum | |
---|---|---|---|
background_claim | 40 | 153 | 2752 |
data | 40 | 171 | 4093 |
own_claim | 40 | 262 | 5450 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_entity_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=resolve_parts_of_same \
metric.document_type=pie_datasets.builders.brat.BratDocument \
metric.field=spans
len | max | sum | |
---|---|---|---|
contradicts | 40 | 37 | 696 |
semantically_same | 18 | 9 | 44 |
supports | 40 | 300 | 5788 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_relation_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=resolve_parts_of_same \
metric.document_type=pie_datasets.builders.brat.BratDocument \
metric.field=relations
document type TextDocumentWithLabeledMultiSpansAndBinaryRelations
i.e. with conversion
entities | len | max | sum |
---|---|---|---|
background_claim | 40 | 153 | 2752 |
data | 40 | 171 | 4093 |
own_claim | 40 | 262 | 5450 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_entity_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=resolve_parts_of_same \
metric.document_type=pie_modules.documents.TextDocumentWithLabeledMultiSpansAndBinaryRelations \
metric.field=labeled_multi_spans
relations | len | max | sum |
---|---|---|---|
contradicts | 40 | 37 | 696 |
semantically_same | 18 | 9 | 44 |
supports | 40 | 300 | 5788 |
command line
python src/evaluate_documents.py \
dataset=sciarg_base \
metric=count_relation_labels \
+metric.show_as_markdown=true \
dataset.input.revision=caab546e03606630984140917a5e86979caba6e9 \
+dataset.input.name=resolve_parts_of_same \ metric.document_type=pie_modules.documents.TextDocumentWithLabeledMultiSpansAndBinaryRelations \
metric.field=binary_relations
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new dataset variant
resolve_parts_of_same
where all spans connected viaparts_of_same
relations are mergedby using the smallest start index as new start and the biggest end index as new end index, i.e. the max coverage will be used span.intoLabeledMultiSpan
s. It also adds the respective document converters forTextDocumentWithLabeledMultiSpansAndBinaryRelations
andTextDocumentWithLabeledMultiSpansBinaryRelationsAndLabeledPartitions
.IMPORTANT:
TEST_FULL_DATASET = True
.default
dataset variant, so the annotation counts slightly change from:to:
We warn about the annotation removal:
This PR requires:
SpansViaRelationMerger
pie-modules#58trim_text_spans()
to work withLabeledMultiSpan
pie-modules#72RelationArgumentSorter
pie-modules#73TODO:
0.10.6
0.10.8
release ofpie-modules
when availabletest_tokenize_documents_all
fails