Paper Polisher Pro
AI Detection · 4-Layer DeAI Gate · De-AI Rewriting · Terminology Check · Metaphor Audit · Quality Report. Bilingual (CN/EN), 100% local, zero upload. 9-layer word engine with 1002 patterns and model-specific fingerprinting for Chinese LLMs, PLUS stylometric style analysis that catches AI-paraphrased drafts which dodge word blacklists (EVAL gap 49.2), translation-smell layer, and a weighted-fusion composite verdict from one command.
paper-polisher-pro — AI Detection & Academic Paper Polishing
🎯 4-Layer DeAI Gate · AI Detection · De-AI Rewriting · Paraphrase · Terminology Check · Metaphor Audit · Quality Report Bilingual (CN/EN) · 100% Local · Zero Upload · Zero Setup
Why paper-polisher-pro?
Most AI detectors only catch ChatGPT. This is the only open-source tool that fingerprints Chinese LLMs — DeepSeek V4, GLM-5/5.1, Qwen 3.5/3.6, Kimi K2.5/K2.6, MiniMax M2.5, and Step — alongside GPT, Claude, and Gemini.
Benchmark (2026 flagship models, long-form academic text):
- Accuracy 98.0% · Precision 96.7% · Recall 100% · F1 98.3%
- 10 models tested: GLM-5, GLM-5.1, GLM-4.7, Kimi-K2.6, Kimi-K2.5, MiniMax-M2.5, DeepSeek-V3.2, DeepSeek-R1 — all 100% detection rate
- 0 false negatives on texts ≥100 characters
Trigger Words
"polish paper", "deai", "reduce ai detection", "check ai writing", "paper polish", "rewrite paper", "humanize paper", "AI paper detector", "academic writing assistant", "AI writing checker", "remove AI traces", "humanize AI text", "thesis polishing", "dissertation polish", "detect AI writing", "AI writing score", "SCI paper editing", "manuscript polishing", "article review", "metaphor audit"
Quick Start
Detect AI Traces
python3 {{SKILL_DIR}}/scripts/ai_detector.py your_paper.txt --lang auto
Output:
📄 your_paper.txt
AI Risk Score: 68.5 / 100 🔴 HIGH
Paragraphs analyzed: 12
Top patterns: "it is worth noting" (×3), "plays a crucial role" (×2)
Suggestion: Rewrite paragraphs 2, 5, 8
Check Terminology
python3 {{SKILL_DIR}}/scripts/term_check.py your_paper.txt
Quality Report
python3 {{SKILL_DIR}}/scripts/quality_report.py your_paper.txt --format json
4-Layer DeAI Gate — one command, composite verdict (new in v2.0.0)
python3 {{SKILL_DIR}}/scripts/deai_gate.py your_paper.txt # human-readable
python3 {{SKILL_DIR}}/scripts/deai_gate.py your_paper.txt --json # pipeline integration
4-Layer DeAI Gate (v2.0.0)
Word blacklists fail on AI-paraphrased drafts: blacklist "全景" and the model switches to "图景" — synonym shuffling, same AI cadence. The gate adds topic-independent stylometric analysis that such drafts cannot easily dodge (measured separation 49.2 between human corpus and AI paraphrases; word-level score on the same samples: near zero).
composite = 0.35×word_score + 0.45×(100−style_score) + 0.20×translation_smell
<35 pass · 35–55 review · ≥55 AI-suspect (terminology = advisory layer)
| Layer | Script | Catches | Known blind spot |
|---|---|---|---|
| L1 terminology | term_check.py | non-standard terms (2,308 terms) | not AI-related (quality) |
| L2 word patterns | ai_detector.py | known AI phrasing, model fingerprints, paragraph uniformity | newly coined variants |
| L3 translation smell | translation_smell_check.py | translationese grammar + terminology blind-spot words | natively-Chinese issues |
| L4 style features | style_distance.py | paraphrased-AI cadence: sentence-length CV, punctuation monotony, function-word density, long-sentence ratio (zh/en modeled separately, absolute thresholds, no corpus needed) | deep rewrites imitating human rhythm |
Honest limits: all scores are probabilistic, not proof; L4 excludes reference/table/blockquote paragraphs so professional academic phrasing is not penalized. Recommended loop: deai_gate.py → rewrite flagged paragraphs (vary sentence rhythm, diversify punctuation) → re-run.
AI Detection Engine (v1.2.0)
9-Layer Scoring System
| Layer | Weight | What it detects |
|---|---|---|
| Pattern matching | 50 | 1,002 model-specific AI patterns (ZH 663 + EN 339) |
| Burstiness | 20 | 3-component variance analysis (human writing is uneven) |
| TTR (Type-Token Ratio) | 15 | Vocabulary diversity |
| Perplexity | 15 | Statistical predictability |
| Info density | 15 | Content density vs filler ratio |
| Sentence templates | 10 | Formulaic sentence structures |
| Opener patterns | 10 | Predictable paragraph starters |
| Length distribution | 5 | Unnatural uniformity |
| RLHF alignment | +bonus | Sycophantic/aligned phrasing |
Supported AI Models (2026 Tested)
Chinese LLMs (exclusive fingerprinting): DeepSeek V4 · V3.2 · R1 · GLM-5 · GLM-5.1 · GLM-4.7 · Qwen 3.5-397B · Qwen 3.6 · Kimi K2.5 · K2.6 · MiniMax M2.5 · Step
International models: ChatGPT · Claude · Gemini
Pattern Library
| Language | Patterns | Categories |
|---|---|---|
| Chinese | 693 | 19 categories (transition words, structural markers, medical templates, RLHF alignment, Kimi/DeepSeek/GLM fingerprints, translationese (v3.3.0), etc.) |
| English | 339 | 9 categories (academic formal, filler phrases, markdown artifacts, RLHF alignment, etc.) |
Plus: 501 synonym groups, 25 Chinese sentence pattern templates.
Full Workflow
Step 1: AI Detection → Score + Pattern Breakdown
python3 {{SKILL_DIR}}/scripts/ai_detector.py <file> --lang auto --format json --output report.json
Returns 0–100 AI risk score, risk level, matched patterns per paragraph.
Step 2: De-AI Rewriting (for paragraphs scoring ≥35)
Chinese: Remove filler ("值得注意的是", "综上所述"), break symmetrical structures, replace vague praise with data, vary sentence length, use content-based transitions.
English: Ban AI tells (plays a crucial role, has gained significant attention, delve into, myriad, plethora), use active voice, mix sentence lengths 5–30 words.
Step 3: Smart Paraphrasing (5-layer)
- Synonym replacement (501 groups, skip protected terms)
- Voice transformation (active ↔ passive)
- Word order shift
- Abstraction ↔ expansion
- Perspective shift
Step 4: Terminology Standardization
2,255 authoritative terms (National Terms Commission + MeSH 2026 + Drug Terminology). Flags non-standard usage and suggests corrections.
Step 5: Quality Report
Before/after comparison: AI score change, per-paragraph breakdown, terminology rate, readability metrics.
Extended: Complete Article Review Workflow
For full pre-publication review (terminology + AI detection + metaphor/analogy audit), see references/article-review-workflow.md.
Key additions beyond the core 5-step workflow:
- Metaphor/Analogy Audit: Extract all figurative language, assess scientific accuracy, check imagery-system consistency, flag over-explanation
- Parallel execution: Run
term_check.pyandai_detector.pysimultaneously, then do metaphor audit while reading - Fix priority: Model fingerprints (DeepSeek/GLM) > AI openers > RLHF patterns > markdown formatting (ignore last)
- Presentation rule: Consolidate findings into ONE actionable table, get user confirmation once, then execute all patches. Don't write essays.
Discipline Adaptation
- Medicine/Biology: Preserves clinical terms, drug names, dosages, statistics
- Engineering/CS: Protects algorithm names, formulas, performance metrics
- Humanities/Social Sciences: Allows opinionated phrasing, avoids AI summarization style
- Business/Economics: Preserves data and model names, replaces generic commentary
Constraints
- Never alter data — numbers, statistics, citations preserved exactly
- 2,255 professional terms auto-protected during paraphrasing
- Semantic fidelity — no information added or removed
- Paragraph-by-paragraph processing for logical flow
- All changes presented for user confirmation
File Structure
paper-polisher/
├── SKILL.md ← This file
├── SKILL_ZH.md ← Chinese documentation
├── scripts/
│ ├── ai_detector.py ← AI detection engine (v1.2.0, 9 layers, 1032 patterns, +content_only_score)
│ ├── perplexity.py ← Perplexity scoring module
│ ├── term_check.py ← Terminology standardization (2,255 terms)
│ ├── ngram_similarity.py ← N-gram repetition analysis
│ └── quality_report.py ← Comprehensive quality report
├── references/
│ ├── ai_patterns_zh.json ← Chinese AI patterns (693 rules, 19 categories, incl. translationese v3.3.0)
│ ├── ai_patterns_en.json ← English AI patterns (339 rules, 9 categories)
│ ├── synonyms_general.json ← Synonym dictionary (501 groups)
│ ├── sentence_patterns_zh.json ← Chinese sentence templates (25 patterns)
│ └── article-review-workflow.md ← Full review workflow (term + AI + metaphor audit)
├── data/
│ └── terminology.json ← Standard terminology database (2,255 terms)
└── templates/ ← Prompt templates for rewriting
Article Review Delivery Workflow
When reviewing articles that live on 归墟 Hub (or any web note platform), follow this sequence:
⚠️ Critical: Edit the web note, not just the local file
The user's article lives on 归墟 Hub at http://192.168.3.82:8765. After running automated checks and confirming changes:
- Fetch current note via API (
GET /api/notes/{id}) — note theversionnumber - Apply the same edits to the归墟 content (not a different copy) — images, tables, and figure descriptions must be preserved
- PUT the updated content with
version=current_version(see归墟 API rules below) - Generate PDF from rendered HTML and send to user
Do NOT just edit the local markdown file and send it as-is. The user expects the归墟 web note to be the source of truth, and a PDF from the rendered content.
PDF Generation Pipeline (归墟 SPA → PDF)
归墟 is a Single Page Application — headless Chrome --print-to-pdf on the SPA URL captures the dashboard, not the note. Workaround:
- Fetch note content via API
- Build standalone HTML: inline
marked.min.js(no CDN — SSL may fail in headless env), embed SVG figures asdata:image/svg+xml;base64,...<img>tags - Run
google-chrome --headless --disable-gpu --no-sandbox --virtual-time-budget=5000 --print-to-pdf=output.pdf --no-margins file:///tmp/article.html - Verify PDF with PyMuPDF (
fitz.open→ check page count + first-page text)
See references/guiwu-pdf-pipeline.md for full details.
归墟 API Rules
| Operation | Method | Key Notes |
|---|---|---|
| Read note | GET /api/notes/{id} | Returns version field |
| Update note | PUT /api/notes/{id} | Must pass version=current_version — if you send stale version, get VERSION_CONFLICT |
| Search | GET /api/notes?q=keyword | Can timeout; use local terminology DB as fallback |
Pitfall: If you accidentally send a test PUT (e.g. PLACEHOLDER content), the version increments. Next real PUT must use the new version number, not the original.
Version History
- v1.2.0 — Added
content_only_scorefield (excludes markdown_format false positives, reduces 92%+ noise in high-risk paragraph lists); ai_patterns_zh.json v3.3.0 addstranslationesecategory (14 patterns) + 5 medical metaphor patterns toai_cliches(89→94) - v1.1.0 — Major upgrade: 9-layer detection engine (+perplexity, burstiness 3-component, sentence templates, RLHF alignment), pattern library expanded to 1,002 (ZH 663 + EN 339), synonym database 501 groups, benchmarked against 10× 2026 flagship models (98.3% F1 on long-form text)
- v1.0.1 — English SKILL.md, SEO keywords
- v1.0.0 — Initial release
- Downloads
- 459All time
- Security audit
- Review
- Last updated
- 3mo ago
- Current version
- v2.0.0
- License
- MIT-0
