declare-lab/RelationPrompt

Zero shot Relation classification

arian1995 opened this issue · 4 comments

Hi,
Nice paper
In the paper you reported Zero shot Relation classification results but here I didn't see any code for that. didn't you release the code? or should I change the existing one for extraction?

Hi, thank you for the kind comment :)
Sorry we have not yet released the specific code for ZeroRC as it requires a different data processing pipeline to be consistent with the previous benchmark.
As I'm currently busy with another project, it may take a few weeks to integrate into the current repository.

Thanks

jbrry commented

What changes to the data processing pipeline would need to be made?

Can we not just change the extraction setup to include the test head and tail entity in the prompt and get the model to generate the relation as in Figure 4b? Also is the generation of the relation conditioned on the number of unseen relations or is it over the full tokenizer vocabulary?

jbrry commented

I think I understand why it is more appropriate to do this in the data processing stage. Basically we need to modify all input files passed to the extractor model.

Currently it is done here in encoder.encode_to_line. We would need to make a similar function to take the head and tail entities out of the summary and into the input text, so the input contains the context, head and tail, and the output is just the relation.