File: sgml-spell-checker.1

package info (click to toggle)
sgml-spell-checker 0.0.20040919-3
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, lenny, sid, squeeze, stretch, wheezy
  • size: 148 kB
  • sloc: sh: 173; perl: 109; makefile: 2
file content (123 lines) | stat: -rw-r--r-- 3,661 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
.TH sgml-spell-checker 1 2004\-09\-19 "SGML spell checker" "SGML"
.SH NAME
sgml-spell-checker \- SGML spell checker
.SH SYNOPSIS
.B nsgmls -l
.I yourdoc.sgml
.B | sgml-spell-checker
.RI [ option ]
\&...
.SH DESCRIPTION
.B sgml-spell-checker
is a tool that you can use to automatically spell-check your SGML documents.  One
of the advantages of this tool over some other SGML-aware spell checkers is that it
scans your documents in the form in which the SGML parser actually sees it, which
means it is not line-based, system entities are resolved, marked sections are
treated appropriately, etc.
.PP
Also, this tool can be made aware of particular DTDs, in the sense
that it knows not to spell-check the content of elements that do not
represent human-language text, such as <programlisting> in DocBook.
An exclusion list for the DocBook DTD is included, others can be added
trivially.
.PP
The input to
.B sgml-spell-checker
is the text representation of your SGML document's
Element Structure Information Set as generated by
.B nsgmls 
(from SP or OpenSP; sometimes installed under the name
.BR onsgmls ).
In other words, you need to pipe the output of
.B nsgmls
into
.B sgml-spell-checker
as shown in the synopsis.  Provide to
.B nsgmls
the options you need, such as
.B \-c
to search more catalogs,
.B \-i
to include a marked section, or more source files.  Do not forget the
.B \-l
option, or you won't get any file or line references for the
misspellings.
.PP
The second part of the pipe takes a couple of options; see below.
Note that if the language of the document does not match your system's
locale settings, you need to use the
.B --language
option.
.PP
The output of
.B sgml-spell-checker
is a list of the words that are misspelled (in the opinion of
.BR aspell ),
together with file name and line number.  Note that the line number
designates where the element that contains the word started, not where
the word actually is.  So most likely you will have to search a few
lines below the indicated location.
.SH OPTIONS
.TP
.B \-\-debug
Debug mode.  Generates lots of output not of interest to the normal user.
.TP
.BI \-\-language= language
Sets the language of the document.  (The format depends on the
.B aspell
installation, but something like
.B en
or
.B en_US
should work.)
By default the language is taken from the system locale settings.
.TP
.B \-\-suggestions
Shows correction suggestions for misspelled words.
.TP
.BI \-\-dictionary= file
Uses an additional
.B aspell
dictionary file.  This option may be used multiple times.
.TP
.BI \-\-dtd= dtd
Uses the exclusion list for the specified DTD (e.g.,
.BR "docbook" ).
.TP
.B \-\-help
Shows a brief help, then exits.
.SH EXAMPLES
.nf
nsgmls -l -D . mydoc.sgml | \\
sgml-spell-checker --language=en --dtd=docbook \\
   --dictionary=mydict1.aspell --dictionary=mydict2.aspell
.fi

(You can enter this command all on one line without the backslashes,
or on several lines with the backslashes.)
.SH NOTES
Read the
.B aspell
documentation about how to set up the appropriate dictionaries.  In
case you're having trouble interpreting the
.B aspell
documentation, here's how to make an
.B aspell
dictionary file from a flat word list:

.nf
rm -f mydict1.aspell    # aspell won't overwrite existing files
aspell --language-tag=xx create master ./mydict1.aspell < mywordlist.txt
.fi

Watch the slashes.
.B aspell
likes to see a slash in the name or it will search some default
location.
.SH BUGS
This program should be able to identify the language from the document
(e.g., <book lang="de">), but
.B aspell
doesn't handle changing the language on the fly.
.SH AUTHOR
Peter Eisentraut (peter_e@gmx.net)