Documentation ¶
Overview ¶
Typo is a modern version of the original Unix typo command, a scan of whose man page is at
https://github.com/robpike/typo/blob/master/typo.png
and whose early C source code is in the unix subdirectory of this repo.
This Go version ignores nroff but handles Unicode and can strip simple HTML tags. It provides location information for each typo, including the byte number on the line. It also identifies repeated words, a a typographical error that occurs often.
The -r flag suppresses reporting repeated words. The -n and -t flags control how many "typos" to print.' The -html flag enables simple filtering of HTML from the input.
See the comments in the source for a description of the algorithm, extracted from Bell Labs CSTR 18 by Robert Morris and Lorinda L. Cherry.