stylefp

Extract stylistic fingerprints from text

What is stylometric analysis?

Every writer has a fingerprint — not in what they say, but in how they say it. Sentence length, vocabulary choices, punctuation habits, and rhetorical patterns combine into a unique stylistic signature.

Quantitative analysis

Quantitative analysis runs entirely on your machine using spaCy NLP — no API key required. Your text passes through 8 analyzers that measure sentence structure, vocabulary diversity, punctuation habits, paragraph organization, readability, rhetorical patterns, writing style classification, and image & diagram features. The result is a precise, numerical fingerprint of your writing.

Qualitative analysis

Qualitative analysis enriches the fingerprint with LLM-powered observations: tone, mood, narrative voice, style register, audience assessment, and distinctive quirks that numbers alone can’t capture. This step requires an Anthropic API key — it sends a sample of your text to Claude for analysis.

Once you have a fingerprint, you can generate a style guide (a human-readable instruction manual for your style) and use it to rewrite any text in that style via the Rewrite tab — both powered by an LLM.

Analysis Pipeline
Your Text
spaCy NLP Processing
Quantitative analysis no API key needed
1. Sentences
2. Vocabulary
3. Punctuation
4. Structure
5. Readability
6. Rhetorical
7. Writing Style
8. Images & Diagrams
Qualitative analysis requires API key
9. LLM Qualitative (optional)
Stylistic Fingerprint
LLM Rewrite
metrics only · requires API key
Style Guide + LLM Rewrite
requires qualitative + API key

Use case

The primary use case for stylefp is style-transferred document production: given a source document and a target writing style, produce a new document that preserves the original content — facts, data, arguments — while adopting the voice, tone, sentence patterns, and rhetorical habits of the target style.

For example, you might take a plain factual article and rewrite it in a technical-report style rich in diagrams and structured data, or transform dry documentation into an engaging narrative — with the goal of keeping data and claim accuracy from the original.

Because the rewrite is LLM-driven, there is a risk of hallucinated content within prose or generated diagrams and charts. stylefp mitigates this with a strict validation pipeline that extracts every number from the source and checks it against the rewritten output.

The Rewrite Pipeline

The rewrite pipeline combines style analysis with data-integrity checks to produce a style-transferred document that preserves the original facts.

Target Corpus
Style Analysis
spaCy + 8 quantitative analyzers
LLM qualitative (optional)
Stylistic Fingerprint + Style Guide
Source Document
Data Extraction
extract_data_points() → whitelist
extract_data_containers()
Numbers Whitelist + Containers
LLM Rewrite (Fingerprint + Guide + Data → Claude)
Diagram Validation zero tolerance
Extract numbers from each diagram
Check against container whitelist
Any fabricated → strip entire diagram
Prose Validation highlight only
Extract numbers from prose text
Check against full source whitelist
Fabricated → highlighted with warning
Clean Output (verified diagrams + annotated prose)

The left branch produces the style target: a fingerprint from quantitative analysis (and optionally qualitative LLM analysis), plus a human-readable style guide. The right branch extracts every number and structured data container from the source document to build a whitelist.

Both feed into the LLM rewrite step, where Claude receives the fingerprint, style guide, data whitelist, and original text. The output then passes through two validation stages: diagram validation strips any code block containing a fabricated number (zero tolerance), while prose validation highlights fabricated numbers inline without removing them (since stripping would break coherence).

See the full pipeline in action with a precomputed analysis of 27 technical documents, plus a style-transferred rewrite of an Eiffel Tower article.


Try it

Choose an analysis mode, upload your files, and click Analyze. The Demo tab will guide you through each metric step by step.

Analysis mode
📄

Drag & drop files here, or

Accepted formats: .txt, .md, .markdown, .rst, .html, .htm

Rewrite any text to match a target writing style. Choose the source of your style profile below.

Style source

No analysis available yet. Go to the Overview tab, upload files, and click Analyze first.

Required for rewriting. Your key is sent for this request only and is discarded immediately after — check the source code to verify.

Precomputed examples:
The rewritten text will appear here.