This page covers every requirement and setup step for running Halgorithem. The library is currently distributed as source code, so installation means cloning the repository and installing Python dependencies manually. A virtual environment is strongly recommended to avoid conflicts with other projects.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/TangibleResearch/Halgorithem/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Python 3.8 or higher — Halgorithem uses type annotations and f-strings that require Python 3.8+.
- Virtual environment — isolate the project’s dependencies from your system Python.
- git — required to clone the repository.
Installation steps
Download the spaCy language model
The library loads
en_core_web_lg at import time. Download it before running any verification:What each key package does
| Package | Role in Halgorithem |
|---|---|
spacy + en_core_web_lg | Tokenization, POS tagging, named entity recognition, and dependency parsing for claim filtering |
sentence-transformers | Generates semantic embeddings (all-MiniLM-L6-v2) used to score claims against truth document chunks |
pysbd | Sentence boundary detection — splits AI output into individual claims |
nltk + WordNet | Synonym expansion: lets a claim token match source tokens with the same meaning |
negspacy | Negation detection — flags claims where the AI inverts the meaning of a source statement |
quantulum3 | Extracts numbers and quantities from text (handles “seven billion”, “$4.2B”, ordinals) |
sympy | Evaluates and verifies math claims such as 2 + 2 = 4 |
textacy | Unicode normalization and text preprocessing |
clean-text | Strips URLs, emails, and non-ASCII characters from raw text |
markdown-it-py | Converts Markdown-formatted AI output to plain text before processing |
scikit-learn | Provides the English stop words list used during tokenization |
beautifulsoup4, html2text, requests | Web scraping: fetch and convert HTML pages to plain text for use as truth sources |
flask | Powers the optional web server interface |
openai | Used only by the Engine class to generate AI responses — not needed for standalone verification |