syscred 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. syscred-2.2.0/LICENSE +21 -0
  2. syscred-2.2.0/PKG-INFO +259 -0
  3. syscred-2.2.0/README.md +204 -0
  4. syscred-2.2.0/pyproject.toml +114 -0
  5. syscred-2.2.0/setup.cfg +4 -0
  6. syscred-2.2.0/src/syscred/__init__.py +41 -0
  7. syscred-2.2.0/src/syscred/api_clients.py +560 -0
  8. syscred-2.2.0/src/syscred/backend_app.py +363 -0
  9. syscred-2.2.0/src/syscred/config.py +275 -0
  10. syscred-2.2.0/src/syscred/database.py +54 -0
  11. syscred-2.2.0/src/syscred/debug_factcheck.py +43 -0
  12. syscred-2.2.0/src/syscred/debug_graph_json.py +58 -0
  13. syscred-2.2.0/src/syscred/debug_init.py +33 -0
  14. syscred-2.2.0/src/syscred/debug_local_server.py +25 -0
  15. syscred-2.2.0/src/syscred/diagnose_imports.py +37 -0
  16. syscred-2.2.0/src/syscred/eval_metrics.py +349 -0
  17. syscred-2.2.0/src/syscred/graph_rag.py +171 -0
  18. syscred-2.2.0/src/syscred/ir_engine.py +410 -0
  19. syscred-2.2.0/src/syscred/ontology_manager.py +509 -0
  20. syscred-2.2.0/src/syscred/run_benchmark.py +135 -0
  21. syscred-2.2.0/src/syscred/seo_analyzer.py +610 -0
  22. syscred-2.2.0/src/syscred/setup.py +65 -0
  23. syscred-2.2.0/src/syscred/test_graphrag.py +87 -0
  24. syscred-2.2.0/src/syscred/test_phase1.py +28 -0
  25. syscred-2.2.0/src/syscred/test_phase2.py +55 -0
  26. syscred-2.2.0/src/syscred/test_suite.py +64 -0
  27. syscred-2.2.0/src/syscred/verification_system.py +765 -0
  28. syscred-2.2.0/syscred.egg-info/PKG-INFO +259 -0
  29. syscred-2.2.0/syscred.egg-info/SOURCES.txt +32 -0
  30. syscred-2.2.0/syscred.egg-info/dependency_links.txt +1 -0
  31. syscred-2.2.0/syscred.egg-info/entry_points.txt +3 -0
  32. syscred-2.2.0/syscred.egg-info/requires.txt +32 -0
  33. syscred-2.2.0/syscred.egg-info/top_level.txt +1 -0
  34. syscred-2.2.0/tests/test_verification.py +132 -0
syscred-2.2.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Dominique S. Loyer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
syscred-2.2.0/PKG-INFO ADDED
@@ -0,0 +1,259 @@
1
+ Metadata-Version: 2.4
2
+ Name: syscred
3
+ Version: 2.2.0
4
+ Summary: A Neuro-Symbolic AI System for Information Credibility Verification
5
+ Author-email: "Dominique S. Loyer" <loyer.dominique@uqam.ca>
6
+ Project-URL: Homepage, https://github.com/DominiqueLoyer/systemFactChecking
7
+ Project-URL: Repository, https://github.com/DominiqueLoyer/systemFactChecking
8
+ Project-URL: Documentation, https://github.com/DominiqueLoyer/systemFactChecking/tree/main/03_Docs
9
+ Project-URL: Bug Tracker, https://github.com/DominiqueLoyer/systemFactChecking/issues
10
+ Project-URL: Zenodo, https://doi.org/10.5281/zenodo.17943226
11
+ Project-URL: Sponsor, https://github.com/sponsors/DominiqueLoyer
12
+ Keywords: fact-checking,credibility,information-verification,neuro-symbolic-ai,ontology,nlp,explainable-ai
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.8
19
+ Classifier: Programming Language :: Python :: 3.9
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Operating System :: OS Independent
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: requests>=2.28.0
27
+ Requires-Dist: beautifulsoup4>=4.11.0
28
+ Requires-Dist: python-whois>=0.8.0
29
+ Requires-Dist: rdflib>=6.0.0
30
+ Requires-Dist: flask>=2.3.0
31
+ Requires-Dist: flask-cors>=4.0.0
32
+ Requires-Dist: python-dotenv>=1.0.0
33
+ Requires-Dist: pandas>=2.0.0
34
+ Provides-Extra: ml
35
+ Requires-Dist: torch>=2.0.0; extra == "ml"
36
+ Requires-Dist: transformers>=4.30.0; extra == "ml"
37
+ Requires-Dist: sentence-transformers>=2.2.0; extra == "ml"
38
+ Requires-Dist: numpy>=1.24.0; extra == "ml"
39
+ Requires-Dist: lime>=0.2.0; extra == "ml"
40
+ Provides-Extra: production
41
+ Requires-Dist: gunicorn>=20.1.0; extra == "production"
42
+ Requires-Dist: psycopg2-binary>=2.9.0; extra == "production"
43
+ Requires-Dist: flask-sqlalchemy>=3.0.0; extra == "production"
44
+ Provides-Extra: dev
45
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
46
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
47
+ Requires-Dist: black>=23.0.0; extra == "dev"
48
+ Requires-Dist: flake8>=6.0.0; extra == "dev"
49
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
50
+ Provides-Extra: all
51
+ Requires-Dist: syscred[ml]; extra == "all"
52
+ Requires-Dist: syscred[production]; extra == "all"
53
+ Requires-Dist: syscred[dev]; extra == "all"
54
+ Dynamic: license-file
55
+
56
+ # Fact Checking System: Information Credibility Verification
57
+
58
+ <!-- [![DOI](https://zenodo.org/badge/992891582.svg)](https://zenodo.org/badge/latestdoi/992891582) -->
59
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DominiqueLoyer/systemFactChecking/blob/main/02_Code/v2_syscred/syscred_colab.ipynb)
60
+ [![Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://github.com/DominiqueLoyer/systemFactChecking/blob/main/02_Code/v2_syscred/syscred_kaggle.ipynb)
61
+ [![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-FFDD00?logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/dominiqueloyer)
62
+ [![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-DominiqueLoyer-EA4AAA?logo=github-sponsors)](https://github.com/sponsors/DominiqueLoyer)
63
+
64
+ **PhD Thesis Prototype** - Dominique S. Loyer
65
+ *Citation Key: loyerModelingHybridSystem2025*
66
+
67
+ > [!NOTE]
68
+ > **New in v2.2 (Jan 29, 2026)**:
69
+ > - **GraphRAG**: Contextual memory from Knowledge Graph.
70
+ > - **Interactive Graph**: D3.js visualization with physics and details on click.
71
+ > - **Cloud Ready**: Docker & Supabase integration.
72
+
73
+ ---
74
+
75
+ ## 📋 Overview
76
+
77
+ A **neuro-symbolic AI system** for verifying information credibility that combines:
78
+
79
+ - **Symbolic AI**: Rule-based reasoning with OWL ontologies (RDF/Turtle)
80
+ - **Neural AI**: Transformer models for sentiment analysis and NER
81
+ - **IR Engine**: BM25, TF-IDF, and PageRank estimation
82
+
83
+ The system provides explainable credibility scores (High/Medium/Low) with detailed factor breakdown.
84
+
85
+ ---
86
+
87
+ ## 🚀 Quick Start (v2.0 - January 2026)
88
+
89
+ ### Option 1: Run on Kaggle/Colab (Recommended)
90
+
91
+ 1. Click the **Kaggle** or **Colab** badge above
92
+ 2. Enable GPU runtime
93
+ 3. Run All cells
94
+
95
+ ### Option 2: Local Installation (Docker / Recommended)
96
+
97
+ ```bash
98
+ # Clone the repository
99
+ git clone https://github.com/DominiqueLoyer/systemFactChecking.git
100
+ cd systemFactChecking/02_Code
101
+
102
+ # Run with Startup Script (Mac/Linux)
103
+ ./start_syscred.sh
104
+ # Access at http://localhost:5001
105
+ ```
106
+
107
+ ### Option 3: Manual Python Run
108
+
109
+ ```bash
110
+ cd systemFactChecking/02_Code
111
+ pip install -r syscred/requirements.txt
112
+ python syscred/backend_app.py
113
+ ```
114
+
115
+ ### Option 3: Python API
116
+
117
+ ```python
118
+ from v2_syscred.verification_system import CredibilityVerificationSystem
119
+
120
+ # Initialize
121
+ system = CredibilityVerificationSystem()
122
+
123
+ # Verify a URL
124
+ result = system.verify_information("https://www.lemonde.fr/article")
125
+ print(f"Score: {result['scoreCredibilite']} ({result['niveauCredibilite']})")
126
+
127
+ # Verify text directly
128
+ result = system.verify_information(
129
+ "According to Harvard researchers, the new study shows significant results."
130
+ )
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 📡 REST API Endpoints
136
+
137
+ | Endpoint | Method | Description |
138
+ |----------|--------|-------------|
139
+ | `/api/verify` | POST | Full credibility verification |
140
+ | `/api/seo` | POST | SEO analysis only (faster) |
141
+ | `/api/ontology/stats` | GET | Ontology statistics |
142
+ | `/api/health` | GET | Server health check |
143
+
144
+ ### Example Request
145
+
146
+ ```bash
147
+ curl -X POST http://localhost:5000/api/verify \
148
+ -H "Content-Type: application/json" \
149
+ -d '{"input_data": "https://www.bbc.com/news/article"}'
150
+ ```
151
+
152
+ ### Example Response
153
+
154
+ ```json
155
+ {
156
+ "scoreCredibilite": 0.78,
157
+ "niveauCredibilite": "HIGH",
158
+ "analysisDetails": {
159
+ "sourceReputation": "High",
160
+ "domainAge": 9125,
161
+ "sentiment": {"label": "NEUTRAL", "score": 0.52},
162
+ "entities": [{"word": "BBC", "entity_group": "ORG"}]
163
+ }
164
+ }
165
+ ```
166
+
167
+ ---
168
+
169
+ ## 📁 Project Structure
170
+
171
+ systemFactChecking/
172
+ ├── README.md # This file
173
+ ├── 01_Presentations/ # Presentations (.pdf, .tex)
174
+ ├── 02_Code/ # Source Code & Docker
175
+ │ ├── syscred/ # ⭐ CORE ENGINE (v2.2)
176
+ │ │ ├── graph_rag.py # [NEW] GraphRAG Module
177
+ │ │ ├── verification_system.py
178
+ │ │ ├── database.py # [NEW] Supabase Connector
179
+ │ │ └── ...
180
+ │ ├── start_syscred.sh # Startup Script
181
+ │ ├── Dockerfile # Deployment Config
182
+ │ └── requirements.txt
183
+ ├── 03_Docs/ # Documentation (.pdf)
184
+ └── 04_Bibliography/ # References (.bib, .pdf)
185
+ ```
186
+
187
+ ---
188
+
189
+ ## 🔧 Configuration
190
+
191
+ Set environment variables or edit `02_Code/v2_syscred/config.py`:
192
+
193
+ ```bash
194
+ # Optional: Google Fact Check API key
195
+ export SYSCRED_GOOGLE_API_KEY=your_key_here
196
+
197
+ # Server settings
198
+ export SYSCRED_PORT=5000
199
+ export SYSCRED_DEBUG=true
200
+ export SYSCRED_ENV=production # or development, testing
201
+ ```
202
+
203
+ ---
204
+
205
+ ## 📊 Credibility Scoring
206
+
207
+ The system uses weighted factors to calculate credibility:
208
+
209
+ | Factor | Weight | Description |
210
+ |--------|--------|-------------|
211
+ | Source Reputation | 25% | Known credible sources database |
212
+ | Domain Age | 10% | WHOIS lookup for domain history |
213
+ | Sentiment Neutrality | 15% | Extreme sentiment = lower score |
214
+ | Entity Presence | 15% | Named entities (ORG, PER) |
215
+ | Text Coherence | 15% | Vocabulary diversity |
216
+ | Fact Check | 20% | Google Fact Check API results |
217
+
218
+ **Thresholds:**
219
+
220
+ - **HIGH**: Score ≥ 0.7
221
+ - **MEDIUM**: 0.4 ≤ Score < 0.7
222
+ - **LOW**: Score < 0.4
223
+
224
+ ---
225
+
226
+ ## 📚 Documentation & Papers
227
+
228
+ - [Modeling and Hybrid System for Verification of Sources Credibility (PDF)](03_Docs/Modeling%20and%20Hybrid%20System%20for%20Verification%20of%20sources%20credibility.pdf)
229
+ - [Ontology of a Verification System (PDF)](03_Docs/Ontology_of_a_verification_system_for_liability_of_the_information_may15_2025.pdf)
230
+ - [Beamer Presentation - DIC9335 (PDF)](01_Presentations/syscred_presentation.pdf)
231
+
232
+ ---
233
+
234
+ ## 🏷️ Citation
235
+
236
+ ```bibtex
237
+ @software{loyer2025syscred,
238
+ author = {Loyer, Dominique S.},
239
+ title = {SysCRED: Neuro-Symbolic System for Information Credibility Verification},
240
+ year = {2025},
241
+ publisher = {GitHub},
242
+ url = {https://github.com/DominiqueLoyer/systemFactChecking}
243
+ }
244
+ ```
245
+
246
+ ---
247
+
248
+ ## 📜 License
249
+
250
+ MIT License - See [LICENSE](LICENSE) for details.
251
+
252
+ ---
253
+
254
+ ## 🔄 Version History
255
+
256
+ | Version | Date | Changes |
257
+ |---------|------|---------|
258
+ | v2.0 | Jan 2026 | Complete rewrite with modular architecture, Kaggle/Colab support, REST API |
259
+ | v1.0 | Apr 2025 | Initial prototype with basic credibility scoring |
@@ -0,0 +1,204 @@
1
+ # Fact Checking System: Information Credibility Verification
2
+
3
+ <!-- [![DOI](https://zenodo.org/badge/992891582.svg)](https://zenodo.org/badge/latestdoi/992891582) -->
4
+ [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/DominiqueLoyer/systemFactChecking/blob/main/02_Code/v2_syscred/syscred_colab.ipynb)
5
+ [![Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://github.com/DominiqueLoyer/systemFactChecking/blob/main/02_Code/v2_syscred/syscred_kaggle.ipynb)
6
+ [![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-FFDD00?logo=buy-me-a-coffee&logoColor=black)](https://www.buymeacoffee.com/dominiqueloyer)
7
+ [![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-DominiqueLoyer-EA4AAA?logo=github-sponsors)](https://github.com/sponsors/DominiqueLoyer)
8
+
9
+ **PhD Thesis Prototype** - Dominique S. Loyer
10
+ *Citation Key: loyerModelingHybridSystem2025*
11
+
12
+ > [!NOTE]
13
+ > **New in v2.2 (Jan 29, 2026)**:
14
+ > - **GraphRAG**: Contextual memory from Knowledge Graph.
15
+ > - **Interactive Graph**: D3.js visualization with physics and details on click.
16
+ > - **Cloud Ready**: Docker & Supabase integration.
17
+
18
+ ---
19
+
20
+ ## 📋 Overview
21
+
22
+ A **neuro-symbolic AI system** for verifying information credibility that combines:
23
+
24
+ - **Symbolic AI**: Rule-based reasoning with OWL ontologies (RDF/Turtle)
25
+ - **Neural AI**: Transformer models for sentiment analysis and NER
26
+ - **IR Engine**: BM25, TF-IDF, and PageRank estimation
27
+
28
+ The system provides explainable credibility scores (High/Medium/Low) with detailed factor breakdown.
29
+
30
+ ---
31
+
32
+ ## 🚀 Quick Start (v2.0 - January 2026)
33
+
34
+ ### Option 1: Run on Kaggle/Colab (Recommended)
35
+
36
+ 1. Click the **Kaggle** or **Colab** badge above
37
+ 2. Enable GPU runtime
38
+ 3. Run All cells
39
+
40
+ ### Option 2: Local Installation (Docker / Recommended)
41
+
42
+ ```bash
43
+ # Clone the repository
44
+ git clone https://github.com/DominiqueLoyer/systemFactChecking.git
45
+ cd systemFactChecking/02_Code
46
+
47
+ # Run with Startup Script (Mac/Linux)
48
+ ./start_syscred.sh
49
+ # Access at http://localhost:5001
50
+ ```
51
+
52
+ ### Option 3: Manual Python Run
53
+
54
+ ```bash
55
+ cd systemFactChecking/02_Code
56
+ pip install -r syscred/requirements.txt
57
+ python syscred/backend_app.py
58
+ ```
59
+
60
+ ### Option 3: Python API
61
+
62
+ ```python
63
+ from v2_syscred.verification_system import CredibilityVerificationSystem
64
+
65
+ # Initialize
66
+ system = CredibilityVerificationSystem()
67
+
68
+ # Verify a URL
69
+ result = system.verify_information("https://www.lemonde.fr/article")
70
+ print(f"Score: {result['scoreCredibilite']} ({result['niveauCredibilite']})")
71
+
72
+ # Verify text directly
73
+ result = system.verify_information(
74
+ "According to Harvard researchers, the new study shows significant results."
75
+ )
76
+ ```
77
+
78
+ ---
79
+
80
+ ## 📡 REST API Endpoints
81
+
82
+ | Endpoint | Method | Description |
83
+ |----------|--------|-------------|
84
+ | `/api/verify` | POST | Full credibility verification |
85
+ | `/api/seo` | POST | SEO analysis only (faster) |
86
+ | `/api/ontology/stats` | GET | Ontology statistics |
87
+ | `/api/health` | GET | Server health check |
88
+
89
+ ### Example Request
90
+
91
+ ```bash
92
+ curl -X POST http://localhost:5000/api/verify \
93
+ -H "Content-Type: application/json" \
94
+ -d '{"input_data": "https://www.bbc.com/news/article"}'
95
+ ```
96
+
97
+ ### Example Response
98
+
99
+ ```json
100
+ {
101
+ "scoreCredibilite": 0.78,
102
+ "niveauCredibilite": "HIGH",
103
+ "analysisDetails": {
104
+ "sourceReputation": "High",
105
+ "domainAge": 9125,
106
+ "sentiment": {"label": "NEUTRAL", "score": 0.52},
107
+ "entities": [{"word": "BBC", "entity_group": "ORG"}]
108
+ }
109
+ }
110
+ ```
111
+
112
+ ---
113
+
114
+ ## 📁 Project Structure
115
+
116
+ systemFactChecking/
117
+ ├── README.md # This file
118
+ ├── 01_Presentations/ # Presentations (.pdf, .tex)
119
+ ├── 02_Code/ # Source Code & Docker
120
+ │ ├── syscred/ # ⭐ CORE ENGINE (v2.2)
121
+ │ │ ├── graph_rag.py # [NEW] GraphRAG Module
122
+ │ │ ├── verification_system.py
123
+ │ │ ├── database.py # [NEW] Supabase Connector
124
+ │ │ └── ...
125
+ │ ├── start_syscred.sh # Startup Script
126
+ │ ├── Dockerfile # Deployment Config
127
+ │ └── requirements.txt
128
+ ├── 03_Docs/ # Documentation (.pdf)
129
+ └── 04_Bibliography/ # References (.bib, .pdf)
130
+ ```
131
+
132
+ ---
133
+
134
+ ## 🔧 Configuration
135
+
136
+ Set environment variables or edit `02_Code/v2_syscred/config.py`:
137
+
138
+ ```bash
139
+ # Optional: Google Fact Check API key
140
+ export SYSCRED_GOOGLE_API_KEY=your_key_here
141
+
142
+ # Server settings
143
+ export SYSCRED_PORT=5000
144
+ export SYSCRED_DEBUG=true
145
+ export SYSCRED_ENV=production # or development, testing
146
+ ```
147
+
148
+ ---
149
+
150
+ ## 📊 Credibility Scoring
151
+
152
+ The system uses weighted factors to calculate credibility:
153
+
154
+ | Factor | Weight | Description |
155
+ |--------|--------|-------------|
156
+ | Source Reputation | 25% | Known credible sources database |
157
+ | Domain Age | 10% | WHOIS lookup for domain history |
158
+ | Sentiment Neutrality | 15% | Extreme sentiment = lower score |
159
+ | Entity Presence | 15% | Named entities (ORG, PER) |
160
+ | Text Coherence | 15% | Vocabulary diversity |
161
+ | Fact Check | 20% | Google Fact Check API results |
162
+
163
+ **Thresholds:**
164
+
165
+ - **HIGH**: Score ≥ 0.7
166
+ - **MEDIUM**: 0.4 ≤ Score < 0.7
167
+ - **LOW**: Score < 0.4
168
+
169
+ ---
170
+
171
+ ## 📚 Documentation & Papers
172
+
173
+ - [Modeling and Hybrid System for Verification of Sources Credibility (PDF)](03_Docs/Modeling%20and%20Hybrid%20System%20for%20Verification%20of%20sources%20credibility.pdf)
174
+ - [Ontology of a Verification System (PDF)](03_Docs/Ontology_of_a_verification_system_for_liability_of_the_information_may15_2025.pdf)
175
+ - [Beamer Presentation - DIC9335 (PDF)](01_Presentations/syscred_presentation.pdf)
176
+
177
+ ---
178
+
179
+ ## 🏷️ Citation
180
+
181
+ ```bibtex
182
+ @software{loyer2025syscred,
183
+ author = {Loyer, Dominique S.},
184
+ title = {SysCRED: Neuro-Symbolic System for Information Credibility Verification},
185
+ year = {2025},
186
+ publisher = {GitHub},
187
+ url = {https://github.com/DominiqueLoyer/systemFactChecking}
188
+ }
189
+ ```
190
+
191
+ ---
192
+
193
+ ## 📜 License
194
+
195
+ MIT License - See [LICENSE](LICENSE) for details.
196
+
197
+ ---
198
+
199
+ ## 🔄 Version History
200
+
201
+ | Version | Date | Changes |
202
+ |---------|------|---------|
203
+ | v2.0 | Jan 2026 | Complete rewrite with modular architecture, Kaggle/Colab support, REST API |
204
+ | v1.0 | Apr 2025 | Initial prototype with basic credibility scoring |
@@ -0,0 +1,114 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "syscred"
7
+ version = "2.2.0"
8
+ authors = [
9
+ { name="Dominique S. Loyer", email="loyer.dominique@uqam.ca" },
10
+ ]
11
+ description = "A Neuro-Symbolic AI System for Information Credibility Verification"
12
+ readme = "README.md"
13
+ requires-python = ">=3.8"
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Science/Research",
17
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.8",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Operating System :: OS Independent",
25
+ ]
26
+ keywords = [
27
+ "fact-checking",
28
+ "credibility",
29
+ "information-verification",
30
+ "neuro-symbolic-ai",
31
+ "ontology",
32
+ "nlp",
33
+ "explainable-ai",
34
+ ]
35
+
36
+ # Core dependencies (minimal - fonctionnalités de base)
37
+ dependencies = [
38
+ "requests>=2.28.0",
39
+ "beautifulsoup4>=4.11.0",
40
+ "python-whois>=0.8.0",
41
+ "rdflib>=6.0.0",
42
+ "flask>=2.3.0",
43
+ "flask-cors>=4.0.0",
44
+ "python-dotenv>=1.0.0",
45
+ "pandas>=2.0.0",
46
+ ]
47
+
48
+ [project.optional-dependencies]
49
+ # Machine Learning features (heavy dependencies)
50
+ ml = [
51
+ "torch>=2.0.0",
52
+ "transformers>=4.30.0",
53
+ "sentence-transformers>=2.2.0",
54
+ "numpy>=1.24.0",
55
+ "lime>=0.2.0",
56
+ ]
57
+
58
+ # Production deployment
59
+ production = [
60
+ "gunicorn>=20.1.0",
61
+ "psycopg2-binary>=2.9.0",
62
+ "flask-sqlalchemy>=3.0.0",
63
+ ]
64
+
65
+ # Development and testing
66
+ dev = [
67
+ "pytest>=7.0.0",
68
+ "pytest-cov>=4.0.0",
69
+ "black>=23.0.0",
70
+ "flake8>=6.0.0",
71
+ "mypy>=1.0.0",
72
+ ]
73
+
74
+ # All optional dependencies
75
+ all = [
76
+ "syscred[ml]",
77
+ "syscred[production]",
78
+ "syscred[dev]",
79
+ ]
80
+
81
+ [project.urls]
82
+ Homepage = "https://github.com/DominiqueLoyer/systemFactChecking"
83
+ Repository = "https://github.com/DominiqueLoyer/systemFactChecking"
84
+ Documentation = "https://github.com/DominiqueLoyer/systemFactChecking/tree/main/03_Docs"
85
+ "Bug Tracker" = "https://github.com/DominiqueLoyer/systemFactChecking/issues"
86
+ Zenodo = "https://doi.org/10.5281/zenodo.17943226"
87
+ "Sponsor" = "https://github.com/sponsors/DominiqueLoyer"
88
+
89
+ [project.scripts]
90
+ syscred-verify = "syscred.cli:verify_command"
91
+ syscred-server = "syscred.backend_app:main"
92
+
93
+ [tool.setuptools]
94
+ packages = ["syscred"]
95
+
96
+ [tool.setuptools.package-dir]
97
+ syscred = "src/syscred"
98
+
99
+ [tool.setuptools.package-data]
100
+ syscred = ["*.ttl", "*.rdf", "*.owl", "data/*"]
101
+
102
+ # Black configuration (code formatter)
103
+ [tool.black]
104
+ line-length = 88
105
+ target-version = ['py38', 'py39', 'py310', 'py311']
106
+ include = '\.pyi?$'
107
+
108
+ # Pytest configuration
109
+ [tool.pytest.ini_options]
110
+ testpaths = ["tests"]
111
+ python_files = ["test_*.py", "*_test.py"]
112
+ python_classes = ["Test*"]
113
+ python_functions = ["test_*"]
114
+ addopts = "-v --cov=syscred --cov-report=html --cov-report=term"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,41 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ SysCRED - Système Neuro-Symbolique de Vérification de Crédibilité
4
+ ===================================================================
5
+
6
+ PhD Thesis Prototype - (c) Dominique S. Loyer
7
+ Citation Key: loyerModelingHybridSystem2025
8
+
9
+ Modules:
10
+ - api_clients: Web scraping, WHOIS, Fact Check APIs
11
+ - ir_engine: BM25, QLD, TF-IDF, PRF (from TREC)
12
+ - seo_analyzer: SEO analysis, PageRank estimation
13
+ - eval_metrics: MAP, NDCG, P@K, Recall, MRR
14
+ - ontology_manager: RDFLib integration
15
+ - verification_system: Main credibility pipeline
16
+ """
17
+
18
+ __version__ = "2.0.0"
19
+ __author__ = "Dominique S. Loyer"
20
+ __citation__ = "loyerModelingHybridSystem2025"
21
+
22
+ # Core classes
23
+ from syscred.verification_system import CredibilityVerificationSystem
24
+ from syscred.api_clients import ExternalAPIClients
25
+ from syscred.ontology_manager import OntologyManager
26
+ from syscred.seo_analyzer import SEOAnalyzer
27
+ from syscred.ir_engine import IREngine
28
+ from syscred.eval_metrics import EvaluationMetrics
29
+
30
+ # Convenience alias
31
+ SysCRED = CredibilityVerificationSystem
32
+
33
+ __all__ = [
34
+ 'CredibilityVerificationSystem',
35
+ 'SysCRED',
36
+ 'ExternalAPIClients',
37
+ 'OntologyManager',
38
+ 'SEOAnalyzer',
39
+ 'IREngine',
40
+ 'EvaluationMetrics',
41
+ ]