syscred 2.2.0__py3-none-any.whl

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.
@@ -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,28 @@
1
+ syscred/__init__.py,sha256=lkX2w8c1ArcrgOOWCPVMs99wXPVFZ7BEvqOUeUEokFI,1219
2
+ syscred/api_clients.py,sha256=zNm2Q5IOu8BlKU20mbyC6oCP5d2lJDcKT2mDjyNoO0U,20106
3
+ syscred/backend_app.py,sha256=tWt3m7FqIcq1zwkgRqbAkMB6QWlQkta2Y3v2wB92MqU,12813
4
+ syscred/config.py,sha256=FGR1pnbBD-bEpZZYKhEIYUwZsgMVDJ_Hx6KNMqZ8DpM,8511
5
+ syscred/database.py,sha256=4jRZiiiylRF3FNqvcPKbZo-hZxsFuRIbwBY5WJo_uco,1773
6
+ syscred/debug_factcheck.py,sha256=uskTER3240PZaqZxG_5Sa1LnjMmeQK17gLW7DH372aE,1370
7
+ syscred/debug_graph_json.py,sha256=UVDK7No426Hlmjo924c18o4SQv5mKLXf-jeP1ZBQdEE,1878
8
+ syscred/debug_init.py,sha256=lXZpkz2muqPQTmZD-dTmkSgPloNO0zlqVPPl3eriGHw,995
9
+ syscred/debug_local_server.py,sha256=uuEtawPQJyI7NbBQNGP9k4cABJJA6lBHAB08ygJGmY0,810
10
+ syscred/diagnose_imports.py,sha256=Jmsblj0I9uQqDmrxgP1TvbT6oaOfwAk_HRgnoKwVo6A,853
11
+ syscred/eval_metrics.py,sha256=HTibLJqTBj9O-W2YvtzPui8-IspYXI22ipZBASOJ77s,11248
12
+ syscred/graph_rag.py,sha256=XjfGBLEhNHOZ5-ocKdfJuUBiF1XgFI4-Vnv9nFtJGzY,6127
13
+ syscred/ir_engine.py,sha256=ewggTpvKHJfKdGXFSCkIhJBw_GWZEReE_btVlDiw80E,12310
14
+ syscred/ontology_manager.py,sha256=TjOyWXAWDduIiDF4JYSu1M9eLBKXTDAu007_NSEmc58,20328
15
+ syscred/run_benchmark.py,sha256=NuMt4jx6BPHAg-FN0hv7O8_ClTi7aYEJji2IGSmjTpw,4616
16
+ syscred/seo_analyzer.py,sha256=fkjuC5j4XFLjU5Qbe5VOwE8m5diIMydL618c-KGq_4I,21360
17
+ syscred/setup.py,sha256=QCguZTGs7iLCAYm_QyFJnOMDt8ATnhH-dkYYRBZFQ7Q,1998
18
+ syscred/test_graphrag.py,sha256=6V5__cWvsWHhzA84iOyJBddP4Uiv4-pLSRe04EMDz4U,3211
19
+ syscred/test_phase1.py,sha256=yvF7YJvdhUNRqn33QTmcPG9xYSZWq-jVc9g7DzoKirg,783
20
+ syscred/test_phase2.py,sha256=6up3_5HSMFLx08UzYkTcEQ6fJxMGD2vWeC1E8ecOOJg,2097
21
+ syscred/test_suite.py,sha256=VA3kH7-FV8AeAgo3q9J-Ag4QRqZj9JvbUfdJaI3CJp0,2711
22
+ syscred/verification_system.py,sha256=c9eDgSTuci3z0XMwPtmGqPgXIFvhGlI4KA7eVjv63uQ,30641
23
+ syscred-2.2.0.dist-info/licenses/LICENSE,sha256=UxA2SCp1e_CJspsrL2NhfkCAzQJ7ouc9KtV1VYwk3cM,1080
24
+ syscred-2.2.0.dist-info/METADATA,sha256=4SkAfJUZHKmuO-Hpvk0DJasv3gXmiLG3zW-wI8q40lQ,8769
25
+ syscred-2.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
26
+ syscred-2.2.0.dist-info/entry_points.txt,sha256=kiFeLZt9Xh-k_WxA1wZ_kqUp9vZzoaJPEkwisoptz0U,104
27
+ syscred-2.2.0.dist-info/top_level.txt,sha256=dv8byzr5GEXZ1l4YwcmMQckbbEXnmTBbaAJiLCMBe0o,8
28
+ syscred-2.2.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ syscred-server = syscred.backend_app:main
3
+ syscred-verify = syscred.cli:verify_command
@@ -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.
@@ -0,0 +1 @@
1
+ syscred