xiangrongzeng / copy_re

Release for acl18 paper "Extracting Relational Facts by an End-to-End Neural Model with Copy Mechanism"
197 stars 36 forks source link

How to recover triples from ids for webnlg? #54

Open BrunoLiegiBastonLiegi opened 1 year ago

BrunoLiegiBastonLiegi commented 1 year ago

Hello, I am trying to map the triples_ids for the webnlg data back to the original triples in string form. I understood after some time (it could be helpful to explain this clearly in the readme) that the data is formatted as (sentence_ids, triples_ids) and that each triples_ids is a list of dimension 3*n_triples_in_sentence composed as:

[subject_end_position, object_end_position, relation_id for i in range(n_triples_in_sentence)]

but without the entity_start_position how can you recover the original triple? Alternatively is there any way to map the instance of your modified dataset to the original instances in the webnlg data? Thanks!