ArneBinder
commited on
don't create "joint" relations [DONT MERGE]
Browse filesThis adjusts the converter for `TextDocumentWithLabeledSpansAndBinaryRelations` to produce data comparable with the literature, e.g. [End-to-end Argument Mining with Cross-corpora Multi-task Learning](https://aclanthology.org/2022.tacl-1.37/). However, this irreversibly modifies **and simplifies** the data, i.e. the original data can not be re-constructed.
This should live behind a parameter.
- argmicro.py +6 -6
argmicro.py
CHANGED
@@ -240,12 +240,12 @@ def convert_to_text_document_with_labeled_spans_and_binary_relations(
|
|
240 |
)
|
241 |
relations.append(rel)
|
242 |
# also add the relations between the heads themselves
|
243 |
-
for head1, head2 in combinations(relation.heads, 2):
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
|
250 |
metadata = copy.deepcopy(doc.metadata)
|
251 |
if len(doc.stance) > 0:
|
|
|
240 |
)
|
241 |
relations.append(rel)
|
242 |
# also add the relations between the heads themselves
|
243 |
+
#for head1, head2 in combinations(relation.heads, 2):
|
244 |
+
# rel = BinaryRelation(label="joint", head=adu2entity[head1], tail=adu2entity[head2])
|
245 |
+
# relations.append(rel)
|
246 |
+
# # also add the reverse relation
|
247 |
+
# rel = BinaryRelation(label="joint", head=adu2entity[head2], tail=adu2entity[head1])
|
248 |
+
# relations.append(rel)
|
249 |
|
250 |
metadata = copy.deepcopy(doc.metadata)
|
251 |
if len(doc.stance) > 0:
|