Code Monkey home page Code Monkey logo

factcheck-ko-2023's Introduction

factcheck-ko-2023

Leaderboard

Rank Accuracy(%) SS RTE
1 60.36 org MPE(noised)-CLS
2 58.72 org SPE-CLS
3 56.16 org MPE(noised)-RGS
4 54.06 org MPE-RGS
5 52.58 org SPE-RGS
6 50.88 org MPE-CLS
7 48.82 KNN (k=5) SPE-CLS
8 43.54 KNN (k=5) MPE(noised)-CLS
9 40.01 KNN (k=5) MPE(noised)-RGS
10 37.72 KNN (k=5) MPE-CLS

Install

git clone https://github.com/OnedayOneyeah/factcheck-ko-2023.git
cd factcheck-ko-2023
conda create -n factcheck-ko-2023 python=3.8
conda activate factcheck-ko-2023
pip install -r requirements.txt

Data

Download the data for training here. Save the files in ./data/

  • data/wiki_claims.json: Human-Annotated Dataset for the Factcheck
  • data/train_val_test_ids.json: Lists of claim ids for train/validation/test split

Reproduce the results: Train/Test

SS/RTE model

  • Documents are available here.

  • Save SS checkpoint (download) in ss/checkpoints

  • Save RTE checkpoint (download) in rte/checkpoints

  • Save additional RTE checkpoints in new_rte/checkpoints: (SPE-RGS), (MPE-RGS), (MPE-CLS)

    [Descriptions]
    - SPE: single premise entailment approach
    - MPE: multiple premises entailment approach
    - CLS: classifcation model
    - RGS: regression model

Fact-check model

Demo

  1. Make sure you download the pretrained checkpoints for SS, RTE model.

  2. Run demo.py, i.e., python demo.py Make sure your gpu is available.

  3. Test the model with your own claim.

Evaluation pipeline

  • For evaluation, run eval_pipeline.py, i.e., eval_pipeline.py

    python eval_pipeline.py --dr_pipeline <id> --ss_pipeline <id> --rte_pipeline <id>
    
  • Various combinations can be implemented as followed:

    python eval_pipeline.py --dr_pipeline 2 --ss_pipeline 0 --rte_pipeline 2
    

Model pipelines

1. DR

  • The pipelines are loaded from dr/document_retrieval.py or eval_pipeline.py

  • SimpleDR and SimpleDR2 reduce time for document retrieval.

    Id Model Description
    0 DocumentRetrieval Loading wiki document titles and texts using wiki API
    1 SimpleDR Using pre-retrieved wiki document texts
    2 SimpleDR2 Using pre-retrieved wiki document titles and texts

2. SS

  • The pipelines are loaded from pipelines/ss_org.py and pipelines/ss_knn.py respectively.

    Id Model Description
    0 org Unigram similarity approach
    1 KNN K-nearest neighbors apporach

3. RTE

  • The pipelines are loaded from pipelines/rte.py

    Id Model Accuracy(%)
    0 SPE-CLS 64.67
    1 MPE(noised)-CLS 76.79
    2 MPE(noised)-RGS 67.60
    3 SPE-RGS 54.93
  • You can remove noise by --remove_noise option.

factcheck-ko-2023's People

Contributors

onedayoneyeah avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.