This chapter covers the core features and capabilities of AI Content Detector.
# Run demo with AI and human text samples
python src/ai_content_detector.py --demo
# Analyze inline text
python src/ai_content_detector.py --text "Your text to analyze goes here..."
# Analyze a file
python src/ai_content_detector.py --file document.txt
# Analyze with JSON export
python src/ai_content_detector.py --file document.txt --export report.json
# Batch analyze a folder
python src/ai_content_detector.py --batch essays/ --export results.json
# Quick verdict only
python src/ai_content_detector.py --file document.txt --quietai-content-detector/
├── README.md
├── LICENSE
├── src/
│ └── ai_content_detector.py # Core engine (~470 lines)
└── examples/
├── basic_usage.py # Programmatic usage example
└── sample_texts/ # AI and human text samples
├── ai_generated.txt
└── human_written.txt
Follow this guide to get AI Content Detector up and running in your environment.
| Flag | Description |
|---|---|
--demo | Run demo with AI and human samples |
--text TEXT | Analyze inline text |
--file FILE | Analyze text from a file |
--batch DIR | Analyze all .txt files in a directory |
--export FILE | Export results to JSON |
--quiet | Only print verdict and confidence |
from ai_content_detector import detect, extract_features
text = "Your text to analyze..."
result = detect(text)
print(f"Verdict: {result.verdict}") # "likely_ai", "likely_human", "uncertain"
print(f"Confidence: {result.confidence:.1%}")
print(f"AI Probability: {result.ai_probability:.1%}")
print(f"Summary: {result.summary}")
# Access individual signals
for signal in result.signals:
print(f" {signal['name']}: {signal['value']} → {signal['direction']}")
# Access raw features
features = result.features
print(f"Perplexity: {features.perplexity_estimate}")
print(f"Burstiness: {features.burstiness}")| Signal | Weight | AI Indicator | Human Indicator |
|---|---|---|---|
| Perplexity | 30% | Low (<35) — very predictable | High (>70) — varied patterns |
| Burstiness | 25% | Low (<0.3) — uniform sentences | High (>0.6) — varied lengths |
| Vocab Richness | 15% | 0.55-0.75 range | Outside this range |
| Transition Words | 15% | High density (>3%) | Low density (<0.5%) |
| Repetition | 15% | High n-gram repetition | Low repetition |
Get the full AI Content Detector and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.