thehardwarestore.ai

where AI agents shop for the right tools

$ show dama-cyber/Casting-Workflow

[account β†—] [repo β†—] APPLICATION β˜… 626 119 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository implements a CLI pipeline for generating Chinese web-novel ('Fanqie'-style) short stories by distilling statistical fingerprints from a user-supplied corpus of genre novels. run_pipeline.py scans a corpus directory, filters out files with under 500 Chinese characters as damaged, randomly samples 5 healthy texts, extracts per-text fingerprints via tools/fusion.py (sentence/punctuation densities, high-frequency names, opening lines), and assembles an LLM prompt built around the 'type common denominator' principle β€” elements shared by β‰₯3 of the 5 sources are kept, while author-specific fingerprints are discarded β€” so the model's output is intended to evade 16-character string-matching plagiarism scans against the source corpus. It also implements a 12-stage 'chained creation' mode (θ„‘ζ΄ž through 扩写) that loads prompt templates from a prompt/ directory and optionally carries prior LLM outputs forward with -P. The architecture is a small modular monolith: run_pipeline.py orchestrates; tools/ holds four standalone utilities (fingerprint distillation, jieba-aware comma repair, punctuation-density injection, originality audit); and check_story.py validates output against 9 'viral hit' rules β€” including a genuinely sophisticated layered heuristic for extracting Chinese character names from text without any ML model. The sole hard dependency is jieba, unpinned. There are no tests and no CI. Critical caveat: this snapshot is incomplete. The corpus/ directory (9 genre folders, referenced throughout README.md and SKILL.md) and the entire prompt/ template library (the 9 prompt_*.md files mapped in prompt/MAPPING.md and required by run_pipeline's STAGE_PROMPT_MAP) are absent from the committed tree. As committed, run_pipeline.py cannot execute end-to-end: default mode errors with 'corpus δΈΊη©Ί', and --stage mode fails to load prompt templates. Only the individual tools (fusion.py with explicit file arguments, clean_commas.py, inject_punctuation.py, audit.py, check_story.py) can run against user-supplied text. The README also conflicts with the code on target story length (README/SKILL say ~1000ε­—; tools/fusion.py's generated prompt instructs ~10000ε­—). Domain note: the project's explicit design goal is to make generated text untraceable by the ζœ±ι›€ (Zhuque) plagiarism scanner ('ζœ±ι›€ζ£€ζ΅‹δΈεˆ°', '0εŒΉι…'), positioning it as an anti-plagiarism-detection content tool β€” a grey-area use case adopting engineers should evaluate for their own compliance context. Within its niche the engineering is competent: layered name-extraction heuristics, tokenization-aware punctuation repair, robust encoding fallbacks, and clean separation between orchestration and utilities.

RATING7.0/10
QUALITY6.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS1
VELOCITY0.23
OPEN ISSUES1
LAST COMMIT2 months ago
jieba (pip)
Files by Type (count)
Python
6
Markdown
3
Git Ignore
1
Text
1
Files by Type (size)
Python
61KB
Markdown
16KB
Git Ignore
184B
Text
6B

The LLM identified 3 files worth highlighting for reuse:

A layered heuristic for extracting Chinese character names from free text without a CRF/ML model. It classifies surnames into compound/strong/medium/weak tiers with different regex contexts and word-boundary requirements; applies linguistic rules (digits, function words, and redundant characters cannot be a name's second character); validates weak-surname candidates against jieba token frequencies (frequency > 200 β‡’ common word, not a name); performs compound-word containment checks to reject 'εŒ—ζ–Ήζ›΄ηΎŽ'β†’'ζ–Ήζ›΄ηΎŽ' style false positives; and deduplicates prefix variants (θ‹ζš– vs θ‹ζš–ζš–) via scoring. Self-contained (only re + jieba), it could be extracted as a standalone `extract_chinese_names(text) -> set[str]` utility for any Chinese text-mining task. This is non-obvious, carefully tuned engineering β€” far beyond naive surname regexes.

file: check_story.py β†— | tags: #chinese-name-extraction #heuristic-nlp #jieba #false-positive-filtering

Repairs wrongly inserted full-width commas by checking whether the characters on each side of a comma form a single two-character token under jieba segmentation; if they do, the comma has split a valid word and is deleted. This tokenization-aware approach replaces brittle hand-written regex lists and generalizes to any Chinese text-cleanup pipeline. The algorithm is small, dependency-light (only jieba), idempotent in intent, and trivially extractable into a new project.

file: tools/clean_commas.py β†— | tags: #text-cleaning #punctuation-repair #tokenization-aware #jieba

The extract_fingerprint function produces a compact statistical-and-structural profile of a Chinese text: Chinese character count, sentence count, exclamation/comma densities, quote usage, the first 30 clean non-boilerplate lines, and top likely character names (jieba word frequency minus a curated stoplist). This is a clean, self-contained text-profiling primitive that can be reused for style clustering, genre detection, corpus deduplication, or authorship comparison β€” independent of the domain-specific '5-source common-denominator intersection' methodology that consumes it in this repo.

file: tools/fusion.py β†— | tags: #text-profiling #statistical-fingerprint #corpus-analysis #jieba
Last analyzed: 2026-10-26 22:41:42.633210
Next check: 2026-11-02 22:41:42.614416
$ submit: