Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

chatstyle: a C++ core and a Python app for comparing writing styles in chats (Russian only, so far)

Description and use

chatstyle is a tool for comparing writing styles in Telegram chats, employing multiple stylometry methods and an ensemble to estimate similarity. On Russian data it achieves 95 % accuracy in author ranking.

Problem

A friend lost their main Telegram account and started writing from a new one. The style felt familiar, but the author wanted a quantitative way to verify authorship.

Outcome

On 43 benchmark tasks (25 cross-context, 16 time-split, 2 real case), the ensemble with lexicon ranked the true author first 95% of the time, while the style-only ensemble achieved 91%. The tool performs well on Russian chats, with accuracy improving with longer texts and remaining stable across candidate pool sizes up to 53.

Workflow

  • Collect Telegram chat exports and load them into the app.
  • Select an unknown author's messages and a pool of candidate authors.
  • Run the stylometry analysis (ensemble of character n-gram TF-IDF, Burrows Delta, General Impostors, language model, rhythm, etc.).
  • Review the ranked list and trait matches in the CLI or desktop UI.
  • Optionally enable lexicon mode for short texts or use style-only mode to avoid topic bias.
  • Store chats encrypted with AES-256-GCM.
  • Export reports for further analysis.

Evidence

Most of the code, the tests and the first draft of this article were produced with an AI assistant. I set the goals, supplied the data (my own Russian Telegram chats), told it which accounts belong to the same person, and ran the app myself on a real case: comparing a friend's new account against five candidates.

Source

The task is stylometry: estimate how similar the manner of writing is. Three classic methods have been there from the start: Character n-gram TF-IDF cosine, Burrows Delta, General Impostors.

Source

First series: 43 tasks (25 cross-context, 16 time-split, 2 from the real "friend's second account" case). Candidates: 10 to 36, 2500 words each; the unknown author: 600 to 1400 words.

Source

Ensemble with lexicon: 95% true author ranked first; Style-only ensemble: 91%

Source

The tool works with people's conversations. It estimates similarity; it is not a personality detector and not evidence.

Source

  • Record date: 2026-10-05T18:55:48.547Z