COHERENT manpages

This page displays the COHERENT manpage for typo [Detect possible typographical and spelling errors].

List of available manpages
Index


typo -- Command

Detect possible typographical and spelling errors
typo [-nrs][file ...]

typo proofreads an  English-language document for typographical errors.  It
conducts a  statistical test of  letter digrams and trigrams  in each input
word against digram and trigram frequencies throughout the entire document.
From this test, typo computes an  index of peculiarity for each word in the
document.   A high  index indicates  a word  less like  other words  in the
document  than  does   a  low  index.   Built-in  frequency  tables  ensure
reasonable results even for relatively short documents.

typo reads  each input file  (or the standard  input if none),  and removes
punctuation and non-alphabetic characters to produce a list of the words in
the document.  To reduce the volume  of the output, typo compares each word
against a  small dictionary  of technical words  and discards it  if found.
The  output  consists  of  a  list  of  unique  non-dictionary  words  with
associated index of peculiarity, most peculiar first.  An index higher than
ten  indicates that  the  word almost  certainly  occurs only  once in  the
document.

typo recognizes the following arguments:

-n   Inhibit use of the built-in English digram and trigram statistics, and
     inhibit dictionary screening of  words.  More words will be output and
     the indices of peculiarity will be less useful for short documents.

-r   Inhibit the  default stripping  of nroff escape  sequences.  Normally,
     typo  strips lines  beginning with  `.' and  removes the  nroff escape
     sequences `\'.

-s   Produce output files  digrams and trigrams that contain, respectively,
     the digram  and trigram frequency  statistics for the  given document.
     No  indices of  peculiarity are  calculated  or printed.   If desired,
     these files may be installed in directory /usr/dict.

Files

/tmp/typo* -- Intermediate files
/usr/dict/dict -- Limited dictionary
/usr/dict/digrams -- Digram frequency statistics
/usr/dict/trigrams -- Trigram frequency statistics

See Also

commands,
nroff,
sort,
spell