declare-lab / RelationPrompt

This repository implements our ACL Findings 2022 research paper RelationPrompt: Leveraging Prompts to Generate Synthetic Data for Zero-Shot Relation Triplet Extraction. The goal of Zero-Shot Relation Triplet Extraction (ZeroRTE) is to extract relation triplets of the format (head entity, tail entity, relation), despite not having annotated data for the test relation labels.
MIT License
122 stars 16 forks source link

Demo - for line 5 and line 6 from algo #6

Closed PinkalShah closed 1 year ago

PinkalShah commented 2 years ago

Hello, Thanks a ton for the help. I was wondering where we are suppose to pass the input data(in the form of "context: s") while predict for an complete unseen sentence.

chiayewken commented 2 years ago

Hi, for inference of the relation extractor model, you can pass in the path of the data in a json file, based on the code demo and image below. The data file should follow the same format as the existing data .

image