thunlp / FewRel

A Large-Scale Few-Shot Relation Extraction Dataset
https://thunlp.github.io/fewrel.html
MIT License
731 stars 165 forks source link

Inference on arbitrary texts #74

Open fillipefbr opened 2 years ago

fillipefbr commented 2 years ago

Hello,

I've been using OpenNRE (https://github.com/thunlp/OpenNRE) to extract sentence-level relations of texts (Supervised RE), and I would like to test Few-Shot RE for the same purpose. However, I couldn't integrate Few-Shot RE into OpenNRE nor use it to infer relations on sentences for a real-world application (I tried to edit the source code but with no success so far).

How can I use the provided BERT-PAIR checkpoint to predict relations on arbitrary texts? Could you provide some guidance or examples, please?

Thank you.