Simon Willison’s Weblog

Subscribe

3 shell scripts to improve your writing, or "My Ph.D. advisor rewrote himself in bash." (via) Matt Might in 2010:

The hardest part of advising Ph.D. students is teaching them how to write.

Fortunately, I've seen patterns emerge over the past couple years.

So, I've decided to replace myself with a shell script.

In particular, I've created shell scripts for catching three problems:

  1. abuse of the passive voice,
  2. weasel words, and
  3. lexical illusions.

"Lexical illusions" here refers to the thing where you accidentally repeat a word word twice without realizing, which is particularly hard to spot if the repetition spans a line break.

Matt shares Bash scripts that he added to a LaTeX build system to identify these problems.

I pasted his entire article into Claude and asked it to build me an HTML+JavaScript artifact implementing the rules from those scripts. After a couple more iterations (I pasted in some feedback comments from Hacker News) I now have an actually quite useful little web tool:

tools.simonwillison.net/writing-style

Screnshot of the Writing Style Analyzer tool. I have pasted in the post you are reading now, it found a weasel word "quite" in: "actually quite useful little web tool" and duplicate word "word" in: "word word twice without realizing, which is"

Here's the source code and commit history.