Texts.Analyzer

How to

How to Prepare a Chat for Analysis

Whether you are counting a thread yourself or eventually handing it to a model, the quality of the output depends on the quality of the paste. A chat export is messy by nature: system lines, multi-line messages, attachment placeholders, stickers, edits and deletions.

Here is how to clean one up in five minutes, and which mess actually matters.

The minimum a file needs

Two things:

  1. One message per line, or a clear continuation rule for wrapped lines.
  2. A sender on each message — usually Name: text.

If you have those two, almost every counting tool will work. If you have timestamps as well, you also get reply times, sessions and silences.

The five kinds of noise

System lines. Messages and calls are end-to-end encrypted, X joined using this group's invite link, X changed the subject. They have no real sender and should be dropped, not attributed to the next person.

Attachment placeholders. <Media omitted>, IMG-20240314-WA0002.jpg (file attached), sticker omitted. They tell you something happened but nothing about what was said. Count them separately if you care, skip them otherwise.

Multi-line messages. A WhatsApp message that contains a line break appears as several lines where only the first has a timestamp. A parser that treats every line as a message will invent extra messages from the second line onwards.

Deleted messages. This message was deleted. Keep or drop, but drop consistently — a thread with 40 deletions can swing a speaker's count by ten percent.

Edited messages. Newer exports may mark edits inline. They are still one message, not two.

A quick cleanup recipe

If you are pasting into a tool by hand, this takes two minutes in any text editor:

  1. Paste the export into the editor.
  2. Delete the encryption notice and join/leave lines.
  3. Decide about <Media omitted> and delete those lines too if you only care about text.
  4. Check that no message wraps onto a second line without a name — if it does, join it back to the line above.
  5. Confirm the first line and the last line carry a timestamp.

What you are aiming for is boring and regular. Boring is good: it means nothing has to be inferred.

Why this matters more than the model

People often assume that a better model fixes a messy file. It does not. If a line has no sender, no model can tell you who wrote it; if 40 messages were deleted, no model can read them. The cleaning step determines the ceiling on any analysis, automated or not.

That is also why the analyzer on this site does the cleaning in code rather than asking you to do it: it recognises the timestamp variants, skips system lines and handles multi-line messages, so the counts match what you would get by hand.

What to keep out of any paste

Phone numbers in a raw export, and anything identifying a third person who is not part of the conversation. If you are analysing a group chat, a name is enough; a number and a name together is more than the analysis needs. Trim it before you paste it anywhere, including here.