{"id":19452385,"url":"https://github.com/malvag/claimlinker","last_synced_at":"2026-05-13T08:32:51.117Z","repository":{"id":53505506,"uuid":"217315936","full_name":"malvag/ClaimLinker","owner":"malvag","description":"ClaimLinker is a Web service and API that links arbitrary text to fact-checked claims, offering a novel kind of semantic annotation of unstructured content. The system is based on a scalable, fully unsupervised and modular approach that does not require training or tuning and which can serve high quality results at real time.","archived":false,"fork":false,"pushed_at":"2021-05-18T10:33:46.000Z","size":90046,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T09:45:04.482Z","etag":null,"topics":["elasticsearch","fact-checking","nlp","stanford-corenlp","stanford-nlp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malvag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-24T14:13:11.000Z","updated_at":"2022-03-02T22:31:36.000Z","dependencies_parsed_at":"2022-08-24T22:11:41.924Z","dependency_job_id":null,"html_url":"https://github.com/malvag/ClaimLinker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/malvag/ClaimLinker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvag%2FClaimLinker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvag%2FClaimLinker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvag%2FClaimLinker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvag%2FClaimLinker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malvag","download_url":"https://codeload.github.com/malvag/ClaimLinker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malvag%2FClaimLinker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32974653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T06:31:55.726Z","status":"ssl_error","status_checked_at":"2026-05-13T06:31:51.336Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","fact-checking","nlp","stanford-corenlp","stanford-nlp"],"created_at":"2024-11-10T16:46:40.162Z","updated_at":"2026-05-13T08:32:51.100Z","avatar_url":"https://github.com/malvag.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# ClaimLinker  \nClaimLinker is a Web service and API that links arbitrary text to fact-checked claims, offering a novel kind of semantic annotation of unstructured content.\nThe system is based on a scalable, fully unsupervised and modular approach that does not require training or tuning and which can serve high quality results at real time.\n\nMore information is available at the following paper: \n```\nMaliaroudakis E., Boland K., Dietze S., Todorov K., Tzitzikas Y. and Fafalios P., \n\"ClaimLinker: Linking Text to a Knowledge Graph of Fact-checked Claims\", \nIn Companion Proceedings of the Web Conference 2021.\n```\nA sub-module system has been implemented, divided respectively by the following modules: \n#### Claimlinker_commons (main library for claim linking)\n - ClaimLinker\n - Core NLP API\n - Association Type\n - Similarity Measures\n - Test class\n#### Claimlinker_web (web services)\n - Web Servlet that returns annotations in JSON \n - Web Servlet for Bookmarklet that allows a user to select a piece of text in a web page and check if there are fact-checked claims linked to the selected text.\n - JSP offering a form where the user can give sometext and check if there are fact-checked claims linked to that text.\n#### ElasticSearch_Tools (indexing of claims and search service provision)\n - Initializer for an ElasticSearch server\n - Wrapper API for an ElasticSearch server\n - OpenCSV wrapper class\n\n## Getting Started \n\n### Installation\n\n1. We need to install the FEL library to the ClaimLinker_commons pom.\n\n```bash\ncd ClaimLinker_commons\nmvn install:install-file -Dfile=./lib/FEL-0.1.0-fat.jar -DgroupId=com.yahoo.semsearch -DartifactId=FEL -Dversion=0.1.0 -Dpackaging=jar -DgeneratePom=true\n```\n\n2. Then compile the whole project from the project's root directory:\n```bash\ncd ..\nmvn compile package #to compile and package into jar the claimlinker\n```\n \n3. Get the claim data from a csv, the hash file for **FEL** library the stopwords file and the punctuations file:\ni.e.\n\t - data/ \n\t\t - **claim_extraction_18_10_2019_annotated.csv** (a dataset of fact-checked claims)\n\t\t - **english-20200420.hash** (used by FEL)\n\t\t -  **stopwords.txt**\n\t\t -  **puncs.txt**\n\n\t\t \n#### ElasticSearch setup\n\nYou can check [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html) how you can set up a single-node elasticsearch using docker.\n\n## Usage\n\nInitializing ElasticSearch:\n```bash\njava ElasticInitializer -f \"data.csv\" -h \"elasticsearch_host\"\n```\n\nRunning the ClaimlinkerTest class:\n```bash\njava -cp .:ClaimLinker_commons/target/ClaimLinker_commons-1.0-jar-with-dependencies.jar:ClaimLinker_web/target/ClaimLinker_web-1.0.jar:ElasticSearch_Tools/target/ElasticSearch_Tools-1.0.jar: csd.claimlinker.ClaimLinkerTest\n```\nUsing it as a library:\n```java\nClaimLinker CLInstance = new ClaimLinker(elastic_search_threashold, similarityMeasures, stopwords_file, punctuations_file english_hash_FEL, ElasticSearch_host);\n\nCLInstance.claimLink(text, num_of_returned_claims, associationtype, cleanPrevAnnotations)\n```\ni.e. (csd.claimlinker.ClaimLinkerTest)\n```java\npublic static void main(String[] args) throws Exception{\n        demo_pipeline(\"Of course, we are 5 percent of the world's population;\\n\");\n}\n\nstatic Set\u003cCLAnnotation\u003e demo_pipeline(String text) throws IOException, ClassNotFoundException {\n    AnalyzerDispatcher.SimilarityMeasure[] similarityMeasures = new AnalyzerDispatcher.SimilarityMeasure[]{\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_words,           //Common (jaccard) words\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_lemm_words,      //Common (jaccard) lemmatized words\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_ne,              //Common (jaccard) named entities\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_dissambig_ents,  //Common (jaccard) disambiguated entities BFY\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_pos_words,       //Common (jaccard) words of specific POS\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_ngram,           //Common (jaccard) ngrams\n\t\tAnalyzerDispatcher.SimilarityMeasure.jcrd_comm_nchargram,       //Common (jaccard) nchargrams\n\t\tAnalyzerDispatcher.SimilarityMeasure.vec_cosine_sim             //Cosine similarity\n\t};\n\tClaimLinker CLInstance = new ClaimLinker(20, similarityMeasures, \"data/stopwords.txt\", \"data/puncs.txt\", \"data/english-20200420.hash\", \"192.168.2.112\");\n\tSystem.out.println(\"Demo pipeline started!\");\n\tSet\u003cCLAnnotation\u003e results = CLInstance.claimLink(text, 5, Association_type.all, true);\n\treturn results;\n}\n```\nUsing it as a Web Service returning results in JSON:\n```\nExample request for text \"You know, interest on debt will soon exceed security spending.\":\n\nhttp://\u003cclaimlinker-url\u003e/claimlinker?app=service\u0026text=You%20know,%20interest%20on%20debt%20will%20soon%20exceed%20security%20spending.\n\nExample of results in JSON: \n\n{\"_results\":[{\n   \"text\":\"You know, interest on debt will soon exceed security spending.\",\n   \"sentencePosition\":0,\n   \"association_type\":\"same_as\",\n   \"linkedClaims\":[\n       { \"claimReview_claimReviewed\":\"'Within a few years, we will be spending more on interest payments than on national security.'\",\n\t \"_score\":39.261948,\n\t \"extra_title\":\"Mitch Daniels says interest on debt will soon exceed security spending\",\n\t \"rating_alternateName\":\"false\",\n\t \"creativeWork_author_name\":\"Mitch Daniels\",\n\t \"claimReview_url\":\"http://www.politifact.com/truth-o-meter/statements/2011/feb/17/mitch-daniels/mitch-daniels-says-interest-debt-will-soon-exceed-/\",\n\t \"claim_uri\":\"http://data.gesis.org/claimskg/creative_work/16076cfe-34c2-542b-9ffa-41a4c8677ced\"},\n       { \"claimReview_claimReviewed\":\"'In just 17 years, spending for Social Security, federal health care and interest on the debt will exceed ALL tax revenue!'\",\n         \"_score\":28.52819,\n\t \"extra_title\":\"Brat says entitlement and debt payments will consume all taxes in 2032\",\n\t \"rating_alternateName\":\"mostly true\",\n\t \"creativeWork_author_name\":\"Dave Brat\",\n\t \"claimReview_url\":\"http://www.politifact.com/virginia/statements/2015/jun/16/dave-brat/brat-says-entitlement-and-debt-payments-will-consu/\",\n\t \"claim_uri\":\"http://data.gesis.org/claimskg/creative_work/928f16c7-1ae8-53bb-a6d2-8aa6a59dbd45\"},\n       { \"claimReview_claimReviewed\":\"'By 2022, just the interest payment on our debt will be greater than the defense of our country.'\",\n         \"_score\":28.45221,\n         \"extra_title\":\"Will interest on the debt exceed defense spending by 2022?\",\n         \"rating_alternateName\":\"mostly true\",\n         \"creativeWork_author_name\":\"Joe Manchin\",\n         \"claimReview_url\":\"http://www.politifact.com/truth-o-meter/statements/2018/may/10/joe-manchin/will-interest-debt-exceed-defense-spending-2022/\",\n         \"claim_uri\":\"http://data.gesis.org/claimskg/creative_work/3579711f-d846-57ba-998a-6c0983c2c2cb\"},\n       { \"claimReview_claimReviewed\":\"'The debt will soon eclipse our entire economy.'\",\n         \"_score\":18.63715,\n\t \"extra_title\":\"Paul Ryan, in State of the Union response, says U.S. debt will soon eclipse GDP\",\n\t \"rating_alternateName\":\"true\",\n\t \"creativeWork_author_name\":\"Paul Ryan\",\n\t \"claimReview_url\":\"http://www.politifact.com/truth-o-meter/statements/2011/jan/26/paul-ryan/paul-ryan-state-union-response-says-us-debt-will-s/\",\n\t \"claim_uri\":\"http://data.gesis.org/claimskg/creative_work/7951dee8-b793-512c-bd13-074f648a052a\"},\n       { \"claimReview_claimReviewed\":\"'Our spending has caught up with us, and our debt soon will eclipse the entire size of our national economy.'\",\n         \"_score\":17.90907,\n\t \"extra_title\":\"House Speaker John Boehner has the right count on the magnitude of the federal debt\",\n\t \"rating_alternateName\":\"true\",\n\t \"creativeWork_author_name\":\"John Boehner\",\n\t \"claimReview_url\":\"http://www.politifact.com/ohio/statements/2011/jan/10/john-boehner/house-speaker-john-boehner-has-right-count-magnitu/\",\n\t \"claim_uri\":\"http://data.gesis.org/claimskg/creative_work/4c906dfc-c6af-5d38-aec4-0808edb2dcb9\"}]}],\"timeElapsed\":1117}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalvag%2Fclaimlinker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalvag%2Fclaimlinker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalvag%2Fclaimlinker/lists"}