Cartus / AGGCN

Attention Guided Graph Convolutional Networks for Relation Extraction (authors' PyTorch implementation for the ACL19 paper)
MIT License
433 stars 88 forks source link

how to preprocess the dataset #34

Closed cxyccc closed 2 years ago

cxyccc commented 3 years ago

I would like to use AGGCN on my own dataset. Could you please kindly provide the preprocess code? Thank you!!

Cartus commented 3 years ago

Unfortunately, we do not have the preprocess code, as the TACRED dataset does not require any preprocessing. Preprocessing your own data into the format of TACRED should be trivial, just several lines of python codes will do.

You can refer to some previous issues, for example, https://github.com/Cartus/AGGCN/issues/20

cxyccc commented 3 years ago

Thank you for your help!

timoderbeste commented 3 years ago

I am curious which POS tagging software is used to process the data. At the moment I am using the Stanford CoreNLP server, but the generated POS tags do not match with the default ones. For example, in the default one, left and right brackets are mapped to -LRB- and -RRB-. The result I got from Stanford is instead NNP.

I also noticed that in the file constant.py, for POS_TO_ID, there are various tags such as "$" and "#". I am wondering which POS tagger produces those tags? Thanks for your help!

Cartus commented 2 years ago

Hi, we used the TACRED dataset from this paper: https://nlp.stanford.edu/pubs/zhang2017tacred.pdf, which claimed that they used Stanford CoreNLP (Manning et al., 2014) to obtain the POS and NER annotations. We simply used the POS and NER included in the dataset, so I do not know about the process to get them.

timoderbeste commented 2 years ago

Got it. Thanks