Skip to content

Fact Checking System: Information Credibility Verification

License

Notifications You must be signed in to change notification settings

DominiqueLoyer/systemFactChecking

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

117 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fact Checking System: Information Credibility Verification

PyPI version DOI Python 3.8+ License: MIT Open In Colab Kaggle OWL RDF License: MIT Buy me a coffee Sponsor on GitHub

PhD Thesis Prototype - Dominique S. Loyer

🏷️ Citation

@software{loyer2025syscred,
  author = {Loyer, Dominique S.},
  title = {SysCRED: Neuro-Symbolic System for Information Credibility Verification},
  year = {2026},
  publisher = {GitHub},
  url = {https://github.com/DominiqueLoyer/systemFactChecking}
}

Note

New in v2.2 (Jan 29, 2026):

  • GraphRAG: Contextual memory from Knowledge Graph.
  • Interactive Graph: D3.js visualization with physics and details on click.
  • Cloud Ready: Docker & Supabase integration.

πŸ“‹ Overview

A neuro-symbolic AI system for verifying information credibility that combines:

  • Symbolic AI: Rule-based reasoning with OWL ontologies (RDF/Turtle)
  • Neural AI: Transformer models for sentiment analysis and NER
  • IR Engine: BM25, TF-IDF, and PageRank estimation

The system provides explainable credibility scores (High/Medium/Low) with detailed factor breakdown.


πŸš€ Quick Start (v2.2 - January 2026)

Installation via PyPI (Recommended)

Option 1: Minimal Installation (Lightweight, ~100 MB)

Perfect for exploring the code, basic credibility checking without ML features:

pip install syscred

Option 2: With Machine Learning (Complete, ~2.5 GB)

Includes PyTorch, Transformers, and all ML models for full credibility analysis:

pip install syscred[ml]

Option 3: Full Installation (All features)

Includes ML, production tools, and development dependencies:

pip install syscred[all]

Alternative: Run on Kaggle/Colab

  1. Click the Kaggle or Colab badge above
  2. Enable GPU runtime
  3. Run All cells

Alternative: Local Installation with Docker

# Clone the repository
git clone https://github.com/DominiqueLoyer/systemFactChecking.git
cd systemFactChecking/02_Code

# Run with Startup Script (Mac/Linux)
./start_syscred.sh
# Access at http://localhost:5001

Python API Usage

from syscred import CredibilityVerificationSystem

# Initialize
system = CredibilityVerificationSystem()

# Verify a URL
result = system.verify_information("https://www.lemonde.fr/article")
print(f"Score: {result['scoreCredibilite']} ({result['niveauCredibilite']})")

# Verify text directly
result = system.verify_information(
    "According to Harvard researchers, the new study shows significant results."
)

πŸ“‘ REST API Endpoints

Endpoint Method Description
/api/verify POST Full credibility verification
/api/seo POST SEO analysis only (faster)
/api/ontology/stats GET Ontology statistics
/api/health GET Server health check

Example Request

curl -X POST http://localhost:5000/api/verify \
  -H "Content-Type: application/json" \
  -d '{"input_data": "https://www.bbc.com/news/article"}'

Example Response

{
  "scoreCredibilite": 0.78,
  "niveauCredibilite": "HIGH",
  "analysisDetails": {
    "sourceReputation": "High",
    "domainAge": 9125,
    "sentiment": {"label": "NEUTRAL", "score": 0.52},
    "entities": [{"word": "BBC", "entity_group": "ORG"}]
  }
}

## πŸ“ Project Structure

hybrid-credibility-system/
β”œβ”€β”€ README.md                           # Documentation principale
β”œβ”€β”€ docker-compose.yml                  # Orchestration des conteneurs
β”œβ”€β”€ .env.example                        # Variables d'environnement
β”‚
β”œβ”€β”€ ontology/
β”‚   β”œβ”€β”€ sysCRED_ontology.owl           # ⭐ Ontologie principale (OWL)
β”‚   β”œβ”€β”€ sysCRED_data.ttl               # DonnΓ©es RDF (Turtle)
β”‚   β”œβ”€β”€ swrl_rules.swrl                # RΓ¨gles SWRL pour infΓ©rence
β”‚   └── individuals.ttl                # Instances (sources, domaines)
β”‚
β”œβ”€β”€ services/
β”‚   β”‚
β”‚   β”œβ”€β”€ s1_neural/                     # 🧠 Couche Neurale (S1)
β”‚   β”‚   β”œβ”€β”€ ner_service/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ app.py                # API: /extract/entities
β”‚   β”‚   β”‚   └── models/
β”‚   β”‚   β”‚       └── bert_ner/         # ModΓ¨le BERT fine-tuned
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ sentiment_service/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ app.py                # API: /extract/sentiment
β”‚   β”‚   β”‚   └── models/
β”‚   β”‚   β”‚       └── distilbert/       # ModΓ¨le DistilBERT
β”‚   β”‚   β”‚
β”‚   β”‚   └── coherence_service/
β”‚   β”‚       β”œβ”€β”€ Dockerfile
β”‚   β”‚       β”œβ”€β”€ requirements.txt
β”‚   β”‚       └── app.py                # API: /extract/coherence
β”‚   β”‚
β”‚   β”œβ”€β”€ bridge/                        # πŸŒ‰ Grounding Layer
β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”œβ”€β”€ grounding.py              # Neural β†’ Symbolic mapping
β”‚   β”‚   └── embeddings/
β”‚   β”‚       └── entity_mapper.pkl     # Embeddings β†’ OWL instances
β”‚   β”‚
β”‚   β”œβ”€β”€ s2_symbolic/                   # πŸ”£ Couche Symbolique (S2)
β”‚   β”‚   β”œβ”€β”€ knowledge_graph/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ app.py                # API: /graph/query
β”‚   β”‚   β”‚   └── neo4j/
β”‚   β”‚   β”‚       └── init.cypher       # Scripts d'initialisation
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ reasoner_service/
β”‚   β”‚   β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”‚   β”‚   β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”‚   β”œβ”€β”€ app.py                # API: /reason/infer
β”‚   β”‚   β”‚   └── lib/
β”‚   β”‚   β”‚       β”œβ”€β”€ hermit.jar        # Reasoner HermiT
β”‚   β”‚   β”‚       └── pellet.jar        # Reasoner Pellet
β”‚   β”‚   β”‚
β”‚   β”‚   └── fact_check_service/
β”‚   β”‚       β”œβ”€β”€ Dockerfile
β”‚   β”‚       β”œβ”€β”€ requirements.txt
β”‚   β”‚       β”œβ”€β”€ app.py                # API: /factcheck/verify
β”‚   β”‚       └── config/
β”‚   β”‚           └── api_keys.yml      # Google Fact-Check API
β”‚   β”‚
β”‚   └── api_gateway/                   # πŸšͺ API Gateway (Orchestration)
β”‚       β”œβ”€β”€ Dockerfile
β”‚       β”œβ”€β”€ requirements.txt
β”‚       β”œβ”€β”€ gateway.py                # API: /verify (main endpoint)
β”‚       β”œβ”€β”€ pipeline.py               # Orchestration des 8 Γ©tapes
β”‚       └── schemas/
β”‚           β”œβ”€β”€ input_schema.json
β”‚           └── output_schema.json
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ sources/
β”‚   β”‚   └── trusted_sources.csv       # Liste sources fiables
β”‚   β”œβ”€β”€ blacklist/
β”‚   β”‚   └── blacklisted_domains.csv   # Domaines bloquΓ©s
β”‚   └── training/
β”‚       β”œβ”€β”€ ner_dataset.json
β”‚       └── sentiment_dataset.json
β”‚
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ test_s1_neural.py
β”‚   β”œβ”€β”€ test_s2_symbolic.py
β”‚   β”œβ”€β”€ test_bridge.py
β”‚   └── test_integration.py
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ architecture.md               # Architecture dΓ©taillΓ©e
β”‚   β”œβ”€β”€ api_documentation.md          # Documentation API
β”‚   β”œβ”€β”€ ontology_design.md            # Design de l'ontologie
β”‚   └── deployment.md                 # Guide de dΓ©ploiement
β”‚
└── scripts/
    β”œβ”€β”€ setup.sh                      # Installation des dΓ©pendances
    β”œβ”€β”€ start_services.sh             # DΓ©marrage des conteneurs
    └── load_ontology.py              # Chargement ontologie dans triplestore
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        INPUT (User)                             β”‚
β”‚                   URL ou Texte                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   LAYER 1: Neural (S1)                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚   NER        β”‚  β”‚  Sentiment   β”‚  β”‚  Coherence   β”‚           β”‚
β”‚  β”‚   (BERT)     β”‚  β”‚ (DistilBERT) β”‚  β”‚   Analysis   β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    BRIDGE: Grounding                            β”‚
β”‚              Neural Embeddings β†’ OWL Instances                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  LAYER 2: Symbolic (S2)                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”‚
β”‚  β”‚  Knowledge   β”‚  β”‚  Reasoner    β”‚  β”‚  Fact-Check  β”‚           β”‚
β”‚  β”‚  Graph       β”‚  β”‚ (HermiT)     β”‚  β”‚  API         β”‚           β”‚
β”‚  β”‚  (Neo4j)     β”‚  β”‚              β”‚  β”‚              β”‚           β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    SCORING & EXPLANATION                        β”‚
β”‚              Credibility Score + Reasoning Trace                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      OUTPUT (JSON)                              β”‚
β”‚          Score, Level, Explanation, Confidence                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜



---

πŸ”§ Configuration

Set environment variables or edit 02_Code/v2_syscred/config.py:

# Optional: Google Fact Check API key
export SYSCRED_GOOGLE_API_KEY=your_key_here

# Server settings
export SYSCRED_PORT=5000
export SYSCRED_DEBUG=true
export SYSCRED_ENV=production  # or development, testing

πŸ“Š Credibility Scoring

The system uses weighted factors to calculate credibility:

Factor Weight Description
Source Reputation 25% Known credible sources database
Domain Age 10% WHOIS lookup for domain history
Sentiment Neutrality 15% Extreme sentiment = lower score
Entity Presence 15% Named entities (ORG, PER)
Text Coherence 15% Vocabulary diversity
Fact Check 20% Google Fact Check API results

Thresholds:

  • HIGH: Score β‰₯ 0.7
  • MEDIUM: 0.4 ≀ Score < 0.7
  • LOW: Score < 0.4

πŸ“š Documentation & Papers


πŸ“œ License

MIT License - See LICENSE for details.


πŸ”„ Version History

Version Date Changes
v2.0 Jan 2026 Complete rewrite with modular architecture, Kaggle/Colab support, REST API
v1.0 Apr 2025 Initial prototype with basic credibility scoring

PrΓ©sentation des graphes (Generated By Perplexity AI) (-_-) Funny!

Graphe 2

Graphe 3

Graphe 4

Graphe 5

Graphe 6

About

Fact Checking System: Information Credibility Verification

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •