ProVe is a system designed to automatically verify claims and references in Wikidata. It extracts claims from Wikidata entities, fetches the referenced URLs, processes the HTML content, and uses NLP models to determine whether the claims are supported by the referenced content.
It:
- extracts claims and references from a Wikidata item,
- fetches reference content from external URLs,
- selects evidence sentences,
- runs textual entailment,
- stores and serves results through API and background services.
The codebase is now organized into three top-level folders inside this workspace:
- prove-api: HTTP/API layer, dashboard, templates, docs, queue endpoint
- prove-processing: background workers, pipeline orchestration, ML/NLP models
- prove-shared: pip-installable shared package (
DataStoreDB abstraction with a MongoDB backend, models, auth, utilities)
Root-level files still include global project metadata such as pyproject.toml, README.md, LICENSE, and project planning docs.
- WikidataParser extracts claims and reference URLs from QIDs.
- HTMLFetcher downloads referenced pages (requests/selenium fallback).
- HTMLSentenceProcessor turns HTML into candidate evidence sentences.
- EvidenceSelector ranks candidate evidence against claims.
- ClaimEntailmentChecker classifies SUPPORTS / REFUTES / NOT ENOUGH INFO.
- TextualEntailmentModule (BERT-FEVER style entailment)
- SentenceRetrievalModule (sentence relevance scoring)
- VerbModule (graph statement verbalization)
- Access goes through the
DataStoreabstraction (prove_shared.database.interface.DataStore), implemented today byMongoDBHandler(prove_shared.database.mongo), with a PostgreSQL backend in progress - MongoDB (current backend): html content, entailment outputs, parser stats, queue/status
- SQLite: historical/aggregated data used by API logic in legacy paths
The shared package is installable and used by API and processing code.
From root:
uv sync
# or
pip install .Root pyproject.toml includes a local path dependency to install prove_shared from prove-shared.
cd prove-shared
pip install -e .from prove_shared import MongoDBHandler, AsyncAuth, Status
from prove_shared.database.mongo import requestItemProcessingprove-shared/
pyproject.toml
config.yaml
src/
prove_shared/
__init__.py
auth.py
file_utils.py
logger.py
objects.py
queue_manager.py
wikidata_utils.py
database/
__init__.py
interface.py # DataStore (ABC) — the contract
mongo.py # MongoDBHandler implementation
postgres.py # PostgreSQLHandler stub
orchestrator.py # get_database() + DatabaseOrchestrator
Use Python 3.10.16 as declared in project metadata.
Install from root:
pip install .The base model assets are still required for processing pipelines.
Download:
Place the base folder at the expected location used by model paths in processing modules.
Environment-specific secrets files are required and should remain gitignored.
Key examples:
- prove-shared/src/prove_shared/local_secrets.py
- prove-api/api/local_secrets.py (if used by API modules)
- prove-processing/utils/local_secrets.py (legacy paths still referenced by some processing code)
Shared runtime settings are in:
- prove-shared/config.yaml
Includes DB paths, batch sizes, thresholds, and algorithm version.
from ProVe_main_process import initialize_models, process_entity
models = initialize_models()
qid = "Q44"
html_df, entailment_results, parser_stats = process_entity(qid, models)cd prove-processing
python ProVe_main_service.pycd prove-api
python api/app.pyThe scheduler can process:
- top viewed Wikidata items,
- pagepile list items,
- heuristic/random QID queues.
- API or scheduler enqueues a QID.
- Processing worker fetches queue task.
- Parser extracts claims + reference URLs.
- HTML collector fetches and stores page content metadata.
- Evidence selector ranks candidate sentences.
- Entailment model classifies claim-evidence relationship.
- Results are written to MongoDB and served by API.
This repository currently contains all three components in one workspace folder, but structure and imports are being aligned for independent repository operation:
- prove-api
- prove-processing
- prove-shared
Project planning details are documented in project.md.
The original README emphasized:
- parser/fetcher/evidence/entailment pipeline,
- MongoDB + SQLite storage model,
- service entry points,
- configuration in config.yaml,
- required external model folder.
All of these remain applicable, now mapped to the split folder layout above.