FActScore icon indicating copy to clipboard operation
FActScore copied to clipboard

How to modify the code to calculate factscore between any two paragraphs/sentences without retrieval steps?

Open laiviet opened this issue 1 year ago • 1 comments

I have a golden paragraph that doesn't need to be retrieved from any source. How to bypass all unnecessary retrieval steps to calculate the FactScore for a predicted sentence..

Thank you in advance.

laiviet avatar Nov 21 '23 20:11 laiviet

Hi @laiviet, thanks for your interest with our work!!

In this case, I think you need to modify some code in factscorer.py - but it shouldn't be too complicated! What you need to do is

  • In the main function, get_score, change L170 so that _get_score will receive another argument called context.
  • Also change L209 to receive an argument context, and then, comment out L215-219 so that it won't use retrieval to obtain context and instead just use the context given as an argument.
  • Optionally, you can also comment out L111-117 as then you can bypass setting up the retrieval corpus.

Let me know if you have any further questions! =)

shmsw25 avatar Nov 22 '23 07:11 shmsw25