3 ms·
I got Claude to port those Bash scripts to a web UI so I could paste code directly into it and see what came out: https://tools.simonwillison.net/writing-style
by simonw 2y ago
I got Claude to port those Bash scripts to a web UI so I could paste code directly into it and see what came out: https://tools.simonwillison.net/writing-style https://tools.simonwillison.net/writing-style
Claude transcript here: https://gist.github.com/simonw/e9902ed1cbda30f90db8d0d22caa06d2 https://gist.github.com/simonw/e9902ed1cbda30f90db8d0d22caa0...
- bmacho 2y agoI don't think it is working properly. The second(?) pattern match is bad. For example, for It is quite difficult to find untainted samples. We used various methods to isolate four samples. it gives Found "quite" in: "is quite difficult to find untainted samples." Found "various" in: "" Otherwise great work, I like these very fast html/js tools.
- KTibow 2y agoLooking at the code, the issue is that both `findWeaselWords` and `getContext` construct a list of words but do it differently: const words = text.toLowerCase().split(/\b/) vs const words = text.split(/\s+/)
- simonw 2y agoI pasted these two comments into Claude and had it update the tool: https://gist.github.com/simonw/dc79f6adcdb189469890bc0a44331774 https://gist.github.com/simonw/dc79f6adcdb189469890bc0a44331... New version is now live at https://tools.simonwillison.net/writing-style https://tools.simonwillison.net/writing-style
- DonHopkins 2y agoWhy not just use Claude itself to review the writing, instead of having it write a much less capable and brittle and limited bash script to do it? You could even ask Claude to write a prompt for itself that performs the same or better function than the bash script. Bash and Perl are like duct tape and chewing gum, so terrible for that kind of stuff, and it's just what Claude does best. It can go so much further by actually weighing alternatives and suggesting changes, instead of just flagging problems. And no weird regular expression inconsistencies that cause false positives and negatives and parsing errors.
- simonw 2y agoMy goal here wasn't to build the best possible writing analysis tool, it was to try out these 2010 bash script rules in a slightly more convenient format (and to play more with Claude Artifacts). I've actually had a tiny bit of trouble using LLMs for writing analysis in the past, though that was more about spell checking. I found they often missed obvious errors, probably because the tokenization step means they don't "see" the exact original prose in a way that makes those errors as obvious as they are to me.