Skip to main content

AI-powered fact-checking tool using free Hack Club AI

Project description

FactCheckr 🔍

An AI-powered fact-checking tool that analyzes claims and provides evidence-based verdicts using free Hack Club AI.

🚀 Quick Start

Install from PyPI

pip install factcheckr

Install from Source

git clone https://github.com/geno543/fact_MCP_tool.git
cd fact_MCP_tool
pip install -e .

✨ Features

  • AI-Powered Analysis: Uses advanced language models for accurate fact-checking
  • Free Service: Powered by Hack Club AI - completely free, no API keys required
  • Multiple Input Methods: Supports single claims, batch processing, and text analysis
  • Detailed Results: Provides verdict, confidence score, and supporting evidence
  • Easy Integration: Simple Python API and command-line interface
  • Instant Setup: No configuration needed - works out of the box
  • Cross-Platform: Works on Windows, macOS, and Linux

📖 Usage

Command Line Interface

# Check a single claim
factcheckr "The Earth is round"

# Interactive mode
factcheckr --interactive

# Check from stdin
echo "Water boils at 100°C" | factcheckr --stdin

# JSON output
factcheckr "Cats have 9 lives" --json

# Show version
factcheckr --version

Python API

from factcheckr import FactCheckr

# Initialize the fact checker
fc = FactCheckr()

# Check a single claim
result = fc.fact_check("The Earth is flat")
print(f"Verdict: {result['verdict']}")
print(f"Confidence: {result['confidence']}")
print(f"Evidence: {result['evidence']}")

# Extract and check claims from text
text = "The sky is blue. Cats have 6 legs. Water boils at 100°C."
claims = fc.extract_claims(text)
for claim in claims:
    result = fc.fact_check(claim)
    print(f"{claim}: {result['verdict']} ({result['confidence']:.2f})")

Batch Processing

from factcheckr import FactCheckr

fc = FactCheckr()
claims = [
    "The Earth is round",
    "Cats have 9 lives", 
    "Python is a programming language"
]

for claim in claims:
    result = fc.fact_check(claim)
    print(f"{claim}: {result['verdict']} ({result['confidence']:.2f})")

📊 Example Output

$ factcheckr "Humans can fly"

Claim: "Humans can fly"
Verdict: False
Confidence: 0.95
Evidence: Humans cannot fly naturally without mechanical assistance. While humans have developed various flying machines and technologies, the human body lacks the necessary biological adaptations for flight, such as wings, hollow bones, and the required muscle structure.

$ factcheckr "Water boils at 100°C at sea level" --json
{
  "claim": "Water boils at 100°C at sea level",
  "verdict": "True",
  "confidence": 0.98,
  "evidence": "Water boils at 100°C (212°F) at standard atmospheric pressure (sea level). This is a well-established scientific fact."
}

🔧 Development

Setup Development Environment

# Clone the repository
git clone https://github.com/geno543/fact_MCP_tool.git
cd fact_MCP_tool

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install in development mode
pip install -e .

# Install development dependencies
pip install pytest black flake8 mypy

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=factcheckr

# Run specific test
pytest tests/test_core.py

Code Quality

# Format code
black src/

# Lint code
flake8 src/

# Type checking
mypy src/

🌟 Why Hack Club AI?

  • Completely Free: No API keys, no rate limits, no costs
  • High Quality: Powered by advanced language models
  • Reliable: Consistent uptime and performance
  • No Setup: Works immediately without configuration
  • Community Driven: Supported by the Hack Club community

📋 Requirements

  • Python 3.7+
  • requests library
  • Internet connection

🤝 Contributing

Contributions are welcome! Please feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🔗 Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

factcheckr-1.0.0.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

factcheckr-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file factcheckr-1.0.0.tar.gz.

File metadata

  • Download URL: factcheckr-1.0.0.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.3.0 tqdm/4.66.5 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.9

File hashes

Hashes for factcheckr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7a2a0d7a24fd61574c0076b5b5a50ff37a5f19978dbfecaf5a9e0de8ce339e33
MD5 3733fd303cff05b1d74b9fdec3efe56d
BLAKE2b-256 6a8d9cf587d1bc73c6a67a60ebdf3beed564790eb53b77f9b6571298d7e31a60

See more details on using hashes here.

File details

Details for the file factcheckr-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: factcheckr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.3.0 tqdm/4.66.5 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.9

File hashes

Hashes for factcheckr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94c66c643206bf46d07cc9fc51b5e2b428ffaf6da4552225b045173131e0580e
MD5 cc3e5cadeedbf6d66faa351e855fc80e
BLAKE2b-256 3aaf73d76f942c16e0ed1590715e8f85f4130360df82e72dd59afcd963394fc7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page