Skip to content

Wrapper for knowledge base-based fact checking systems

License

Notifications You must be signed in to change notification settings

rakshitkr/KB-BasedFC

 
 

Repository files navigation

KB-BasedFC

Wrapper for KB-based Fact Checking systems

Data

Download data from the following URL and decompress it inside each listed folder in the services subdirectory.

Download database used by the microservices from the following URL and decompress it inside each listed folder in the services subdirectory.

Download database used by the microservices from the following URL and decompress it inside KB-BasedFC directory

System requirements

  • OS: Linux Ubuntu / Mac OSX 10.12 (Sierra)
  • Python: Python 2.7 (we developed and tested using the Anaconda distribution)
  • Memory requirements: >4 GB

Runing the services

To run a specific service, go to the services subdirectory and inside one of the services listes in there:

  • For creating the Docker image of the service from the Dockerfile
    docker build -t [NAME_OF_IMAGE] .

  • For creating and running the Docker container from the created service image
    docker container run -it --network="host" --name [<NAME_OF_CONTAINER] [NAME_OF_IMAGE]

To build the Docker images and run the Docker containers altogether:

  • Go to the services subdirectory and run the following command
    docker-compose up

Training the model for Predpath and PRA services

The microservice for PredPath and PRA algorithms requires a training model that has been trained and placed in output folder under the file trained_predpath_model.pkl for predpath and trained_pra_model.pkl for PRA in their respective folders.

If you wish to train the model with different set of records. You will have to run the following code.
python ./predpath_service_training.py or python ./pra_service_training.py accordingly.

Note: Change the path under stream function to that particular file location
datafile = abspath(expanduser('./datasets/sample_data_predpath.csv')) and make sure you are in their respective folders.

Example Triple

Subject URI : http://dbpedia.org/resource/Kobe_Bryant
Predicate URI : http://dbpedia.org/ontology/team
Object URI : http://dbpedia.org/resource/Los_Angeles_Lakers

About

Wrapper for knowledge base-based fact checking systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.4%
  • Java 4.5%
  • TypeScript 1.6%
  • HTML 0.5%
  • Dockerfile 0.4%
  • JavaScript 0.2%
  • Other 0.4%