Skip to content

Feature: Tonality Derivation and Generative AI Style Transfer Validation #68

@craigtrim

Description

@craigtrim

Overview

The ultimate goal of this project is to move beyond passive stylometric analysis toward active tonality derivation — the ability to express an author's writing style in a quantified, communicable form that can:

  1. Describe a tonality to a human or AI in precise, measurable terms
  2. Guide a generative AI to embody that tonality
  3. Validate whether the generative AI is actually reproducing it

Problem Statement

Today, you can prompt an LLM with "Write this in the style of Nevil Shute" — but this is a black box. The LLM may or may not capture the actual stylistic fingerprint of that author, and there is no mechanism to measure conformance.

pystylometry can already extract a rich set of stylometric features: syllable distributions, prosodic patterns, entropy measures, lexical density, punctuation behavior, sentence rhythm, and more. But the missing layer is:

How do we synthesize those features into a form that is useful as both a generative prompt and a conformance target?

Proposed Capabilities

Phase 1: Tonality Report

Generate a structured, human-readable stylometric profile of an author based on a reference corpus. This would include:

  • Dominant rhythmic patterns (e.g., "predominantly 1-2 syllable words, low variance")
  • Sentence length distribution and rhythm
  • Lexical density and register
  • Prosodic fingerprint (syllable pattern repetition, stress regularity)
  • Entropy signature (predictability, syntactic complexity)

Phase 2: Prompt Generation

Translate the tonality report into a structured LLM prompt — a style guide that instructs the LLM how to write in that tonality, grounded in measurable features rather than vague impressionistic labels.

Phase 3: Conformance Scoring

After generation, run the LLM output through pystylometry and compare its feature vector against the reference author's. Produce a style conformance score that answers: Is the generated text actually writing like Nevil Shute?

Why This Matters

  • Makes stylometric analysis actionable, not just descriptive
  • Enables iterative prompt refinement — if conformance is low, adjust the prompt and regenerate
  • Opens the door to style fidelity benchmarking across LLMs
  • Bridges computational stylistics with modern generative AI workflows

Acceptance Criteria

  • Tonality report can be generated from a reference corpus
  • Prompt scaffold can be generated from a tonality report
  • Conformance scoring can compare generated text against reference author features
  • CLI surface for all three operations
  • Integration with mega-meta analysis pipeline

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions