Professional Documents
Culture Documents
Manual
Manual
21, 1998)
Copyright 1993-1998 by Joohee Jeong
Email: jhjeong@bigfoot.com
==========================================================
Please read 00readme.txt for some important information.
==========================================================
Table of Contents
Chapter I. Introduction
1
2
3
4
5
Features of JSPELL
Installation
Test drive
Configuration and hardware compatibility
Terminologies
convenience.
(7) Network support:
Each user can have his/her own configuration and personal
dictionary while sharing the executables and the base
dictionary with other users.
(8) Ignoring specific lines:
You may configure to JSPELL to ignore (i.e., not to spell-check)
all lines starting with a specified string: for instance the ">".
This feature is useful in spell-checking replies to email messages.
(9) More...
There are countless features of JSPELL that will please you.
For instance, the [Find] menu item in the dictionary manager
can display all words in the dictionary that match the given
regular expression: e.g., the pattern "t???e" will give you
the list of all 5 letter words that start with `t' and end
with `e', such as "table", "taste", "tease", "tense" etc., in
just 3 to 5 seconds for a typical 386 machine. Imagine what
you can do with this in solving crossword puzzles!
I.2 Installation
Installation and configuration:
Prepare a "jspell directory", say C:\JSPELL, by the DOS command
mkdir C:\JSPELL
and copy all JSPELL files into this directory. Then C:\JSPELL
should contain the following 9 files
-----------------------------------------------------------------filename
description
-----------------------------------------------------------------00readme.txt
readme file
base.dic
English word list
dictman.exe
the dictionary manager executable
jspell.cfg
configuration
jspell.exe
the spell checker executable
jspell.hlp
help message file
jsptex.cfg
TeX configuration
manual.txt
manual
sample.txt
sample text for a test drive
-----------------------------------------------------------------In order to be able to run JSPELL (and DICTMAN) in any directory,
either add C:\JSPELL to your PATH or put two batch files
JSPELL.BAT and DICTMAN.BAT into one of your directories in PATH.
The content of the batch files jspell.bat and dictman.bat should
look like
@echo off
C:\JSPELL\jspell.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
and
@echo off
C:\JSPELL\dictman.exe %1 %2 %3 %4 %5 %6 %7 %8 %9
respectively.
The default configuration of JSPELL is set to VGA and AT-keyboard.
Also we assume that you work under the plain-vanilla English DOS
environment. If your computer's configuration and/or environment
is different from this, then you will need to read (Section I.4)
of the documentation file manual.txt. If you use non-English DOS,
for instance the DOS box in Korean Windows 95, then the screen
will surely look ugly. In this case, use the command
chcp 437
to get into English mode. To return to Korean mode, use
chcp 949
If you are going to run JSPELL under a networked environment,
then please read (Appendix A.) of manual.doc to complete the
installation.
In order to print out the documentation file manual.doc, your
printer must be able to handle the IBM graphic characters
correctly.
I.3 Test drive
We assume that JSPELL (and dictman) has been correctly installed
on your computer. If not, please refer to the installation
information in the previous section.
Also, we suggest you making a hard copy of this documentation
file manual.doc (by a command like "copy manual.doc prn"), at
least this "Test drive" section, with your printer---you can't
test drive JSPELL while reading this file on a computer screen
unless you run two computers simultaneously. In order to print
out this documentation properly, your printer must be able to
handle the IBM graphic characters correctly.
This test drive is for JSPELL only---not for dictman, which will
be needed only after you've determined to use JSPELL as your
spell checker.
Try the following command at the DOS prompt:
jspell
You will see the following screen (and the DOS prompt).
Usage: jspell [-options...] <filename>
to spell check <filename>, where
option = -bd <base dictionary name>
-ud <user dictionary name>
-fd <file dictionary name>
-len n
(2 <= n <= 9)
-t[+-]
-math[+-]
-percent[+-]
jspell ?
to read the help screen.
or
Don't worry about the -options for the time being. The Usage
tells you that you can spell-check a file, say <filename>, by
the command "jspell filename". We will test this on the text
file "sample.txt" which should exist in the same directory as
jspell.exe. (It won't take long. After all, you can exit from
this test drive whenever you want by hitting Alt-X.)
First, copy this sample file "sample.txt" to the current
directory by the command
copy c:\jspell\sample.txt .
or something like this. Then execute the following command at
the DOS prompt:
jspell sample.txt
Three boxes will be shown on the screen. The upper one is for
text display, the lower left one is for the suggested words, and
the lower right one is for the menu buttons. The row between the
upper and lower area is called the "edit row". Each misspelled
word in the input file sample.txt will be highlighted in the
upper box and also displayed on the edit row. The bottom row is
for displaying some information about the current working of
JSPELL.
First, JSPELL will briefly display the message that looks like
Loading "C:\JSPELL\base.dic".....
at the bottom row, and then spot/highlight the first misspelled
word "jspell" at the center row of the upper box. Also the edit
row will display the highlighted word "jspell" with a half-block
cursor flashing at the end of the word.
Now press DownArrow to highlight the suggested word "spell" and
then press ENTER. You should be able to see that the word
"jspell" has been replaced by "spell" and the second misspelled
word "typcal" is now being spotted/highlighted.
Actually, replacing "jspell" by "spell" was not our intention.
We wanted to [iGnore all] the word "jspell" which occurs several
times in this sample text file. So, hit Alt-U (or click on the
menu button [Undo]) to undo the previous action. Then a dialog
box will pop-up at the center of the screen asking us to choose
one of the three options "Undo", "Cancel" or "Undo further".
Choose the default option "Undo" by either (highlighting "Undo"
and) pressing ENTER or clicking the left mouse button on it. Now
we are back to the previous step. This time, press Alt-G (or
click on the menu button [iGnore all]) to ignore all the
subsequent occurrences of "jspell" as well as this spotted one.
JSPELL should be spotting/highlighting the word "typcal" now.
Naturally we want to replace this by the suggested word
"typical". There are several ways of doing this:
o Highlight "typical" and then press ENTER, or
o Press the key 1, or
o Click left mouse button on the suggested word "typical".
AT
VGA
Enhanced
... more ...
... more ...
user
the
may
the
dictionary case.)
You may use additional user dictionaries specific to a text file
<filename>.<ext> by specifying them in the file dictionary, say
<filename>.dic, in the following way, which is how jspell
supports the use of multiple user dictionaries. Suppose that
you want to use two additional dictionaries "math.dic" and
"comp.dic". Then just add two lines +math.dic and +comp.dic at
the beginning of the file dictionary <filename>.dic---so the
content of the resulting file dictionary for our input file
<filename>.<ext> should look like:
+math.dic
+comp.dic
<word1>
<word2>
...
...
As usual, these additional user dictionaries are first searched
in the current directory and then in the jspell directory. If
both searches fail, then jspell exists with an error message. Up
to 9 additional user dictionaries can be used.
Among the dictionaries mentioned above, the main user dictionary
and the file dictionary may be updated by a jspell session. So
if these two dictionaries happen to have the same filename, then
the filename collision problem occurs, and jspell exists with an
appropriate error message. Other types of dictionary name
collision is less harmful and thus silently ignored by jspell.
(Some computing resources are wasted due to the duplicate copy
of the same dictionary.)
Since user dictionaries (main, file, or additional) can be
freely edited by any text editor, there is a possibility that an
illegitimate word creeps into one of these dictionaries. If
jspell finds an illegitimate word during the initial dictionary
loading, then it exits with an error message at the bottom of
the screen indicating the first encounter of (i) the
illegitimate word <badword>, (ii) the dictionary that contains
<badword> and (iii) the line in which <badword> occurs. You
should immediately delete or fix this <badword>.
If the same word exists in more than one places---in different
dictionaries or in the same dictionary---then it is silently
ignored by jspell. (Some computing resources are wasted due to
the duplicate copy of the same word.)
One final remark: extension of dictionary files need not
necessarily be .dic. It's just convenient to stick to this
naming convention in most situations.
II.2 TeX-mode
II.2.1 Selecting the TeX-mode
This mode is automatically selected if the extension of the
input file is ".tex", case insensitive. You may override this
convention by the command line switch -t[+-]. For instance,
mode>
mode>
mode>
mode>
\end{math}
\end{equation}
\end{eqnarray}
\end{eqnarray*}
TeX ignores any input after the percent symbol % until the end
of line. So it could be desirable for jspell to follow this
after-%-ignoring convention of TeX. For example, we can think of
the following situation:
Send \$25.00 to ...
Here is a tyypo ...
section.
In a typical situation of a jspell session, a misspelled word
<word> in <filename> (assuming that at least one misspelled word
exists) is highlighted and shown together with the surrounding
text in the 78x11 sized box occupying the upper half of the
screen. <word> is also displayed in the row at the middle of
the screen right below the upper box, namely the edit row. Also
the action of the user on the previous misspelled word is
displayed at the bottom of the screen (unless <word> is the
first misspelled word in <filename>).
Words in the jspell's dictionary that are *close* to <word> are
displayed in the lower left box: i.e., the suggestion area. Up
to 16 suggested words can be displayed. Under the "Numbered"
option (which is the default), the highlighted numeral n is
shown in front of the n-th suggested word. (For n > 8, @m is
shown in place of n where m := n - 8.) These numerals give us a
handy way of selecting a word from the list of the suggested
words. We will discuss this in detail in (Section II.3.4). You
may disable this Numbered option by editing the 9th entry of the
configuration file jspell.cfg to replace "Numbered" by
"NoNumbered".
The limit L on the length of the suggested words is 40, which is
the same as the maximum length for legitimate words. But when
there are more than 8 suggested words, then this limit L reduces
to 17 under the Numbered option and 19 under the NoNumbered
option.
The third box in the lower right part of the screen shows menu
buttons. Each menu button contains exactly one uppercase
letter, which is highlighted (or inverse-video'ed for Laptop
color option). This capitalized letter is the command key for
that menu. More on this in the next section.
The time necessary for jspell to prepare a suggested words list
is normally less than a fraction of a second for usual 386
machines. But for longer words (with length, say > 10) and
slower machines, it might take several seconds. Sometimes,
immediately after a word is spotted, you may realize that it's
not really a typo, and you are going to ignore it or add to a
user dictionary. So, naturally, you don't want to waste time
waiting for jspell to finish the preparation of the suggested
words list. In this case, you can just go ahead and do the
appropriate action by pressing a command key or clicking the
left mouse button. Then jspell will abort preparing the
suggested words list and do the action immediately.
Whenever a dialog box is displayed, waiting for a user action,
pressing the ESC key or clicking the right mouse button has the
same effect as choosing the "Cancel" option.
At exit, jspell creates a backup file with the name <filename>.bak
(assuming that the input file has filename <filename>.<ext>) if
(and only if) the "BackUp" option is selected, which is
set/unset by the 7th entry of the configuration file jspell.cfg.
The backup file <filename>.bak is created in the same directory
as the input file.
apple
apple, Apple, APPLE APple
Berlin
Berlin, BERLIN
berlin, BerLin
IBM
IBM
ibm, Ibm, iBm
TeX
TeX
tex, Tex, TEX
II.3.3 Menu
User action can be made by pressing a command key or clicking
the left mouse button. The location of the currently
highlighted area, as well as the key pressed or mouse button
clicked, affects the action. For instance, pressing the command
key ENTER adds the spotted word <spotted.word> into the user
dictionary <user.dic> if the menu button [Add to user.dic] is
being highlighted at that moment, but replaces <spotted.word> by
a suggested word <suggested.word> if the suggested word
<suggested.word> is being highlighted. You can move the
highlighted area by arrow keys.
From now on, "use the menu button <menubutton>" means "click
the left mouse button on <menubutton> or press ENTER while
<menubutton> is being highlighted".
If you press a key that is not a command key or click a mouse
button when the mouse location is irrelevant, then it will be
silently ignored by jspell.
Following are the list of actions that can be made by the user.
Get help: On-line help screen pops up if the command key
F1 is pressed. You can escape the help screen by
hitting ESC or get the second level help screen by
hitting F1 again. Clicking the right mouse button has
the same effect as hitting ESC.
Edit: When the edit row is being highlighted, you can edit
the spotted/highlighted word in the edit row. You can type
in any legal characters and special characters. If you
have a US-keyboard and wants to enter extended ASCII
the
or the
by the
dic]
the main user dictionary and the file specific user dictionary.
When the backup option is set, and if the input file has
extension ".bak", then there is no way to make any change to the
input file and at the same time keep the backup copy of the
original with the filename <filename>.bak. In this situation,
you'll be warned: that is, you'll have the option of disabling
the backup option for the session or just abort at that moment.
jspell refuses to work on a file whose filename extension is
".dic".
jspell needs about 400K bytes of free memory. The rest of the
memory is used as input file buffer. If the input file size is
so large that the input file buffer gets full while running
jspell, then the overspilt text is saved to the disk. You can't
undo an action made on this already-saved part of the text. But
even if the buffer gets full and some part of the text is saved
to the disk, if you abort jspell by the menu [eXit] and choose
not to save the changes made so far, then it'll work without any
problem: i.e., the input file remains intact.
II.4 Configuration files and command line options
jspell uses two configuration files, jspell.cfg and jsptex.cfg.
Both are plain ASCII text files that can be freely edited by any
text editor. The configuration files should exist in the jspell
directory. But the current working directory is first searched
as usual.
In each lines of these two configuration files, if a space
character or the TeX comment character % is encountered then the
rest of the line is ignored. In particular, if a line starts
with a space of %, then the whole line is ignored.
If any illegitimate entry is found in a configuration file, then
jspell exists with an error message showing where it has
happened. It should be stressed that the order of the entries
in the configurations files is important. Be careful not to
mess this up.
jsptex.cfg has been explained in detail in (Section II.2.3).
Hence we'll only look at jspell.cfg in this section. A typical
jspell.cfg file is shown below:
AT
VGA
Enhanced
base.dic
user.dic
>
III.1. Introduction
Entering the command
dictman ?
at the DOS prompt displays the following on the screen:
Usage: dictman [-options...]
option = -len n
(2 <= n <= 9)
-t[+-]
-math[+-]
-percent[+-]
Note that dictman does not accept any input file as a command
line argument.
Each command line switch has the same function as in jspell:
i.e., -len n is used to set the minimum value 2 <= n <= 9 for
the legitimate word length, -t[+-] is to force TeX/non-TeX-mode,
-math[+-] to force math-ignore/math-no-ignore mode and
-percent[+-] to force after-%-ignore/ after-%-no-ignore mode.
This should be enough explanation on the command line switches
for dictman.
An important difference between dictman and jspell exists in the
way the TeX-mode is selected (in case it is not forced by the
command line switch -t[+-]). In jspell the default mode was
determined by the extension of the input file name---the
TeX-mode is selected if the extension is .tex and not selected
otherwise. In dictman, the TeX-mode is always assumed unless
the contrary is forced by the switch -t-. This is because the
name of a dictionary file containing words using TeX constructs,
such as \", \oe etc., has no compelling reason to have the
extension .tex. Moreover, even if the non-TeX-mode is selected
by the switch -t-, it has effect only on the menu item
[UserDic][Read].
dictman shares the two configuration files jspell.cfg, jsptex.cfg
and the help message file jspell.hlp with jspell. As was
explained before, some of those configuration variables have no
effect on dictman, and conversely, one of the variables, namely
the fifth one, has effect on dictman only. We will be back to
this topic in (Section III.3).
dictman provides us with pull-down menu and context sensitive
help system. Left mouse button is normally used in clicking and
dragging while right mouse button is normally used for
canceling. Arrow keys and the usual command keys such as HOME,
END, ENTER, ESC behave as expected. Help key is F1 of course.
If you need help on a particular menu item, then highlight that
item and hit F1. If you use mouse, then hit F1 while the (left)
button is being pressed on the menu item.
Throughout this manual, a menu item of dictman will be denoted in
the following format:
[first level][second level]
directory.
You'll get prompted to
enter the dictionary name pattern in a dialog box. The default
pattern is given in the configuration file jspell.cfg as the 5th
entry. More than one regular expressions separated by spaces are
allowed in this pattern.
[Clear Screen] Clears the main display area.
[Save Screen] Saves the current content of the main display
area to a file "snapshot.0". If snapshot.<n> exists already,
then it is saved as snapshot.<n+1>, where n = 0, ... 8. If
you execute this menu item when n reached 9, then it is
written over snapshot.0 with a warning message.
[Exit=Alt-X] Exits dictman. Asks whether to save any change
made during the session.
III.2.2. [BaseDic] menus
Under this menu [BaseDic], there are 10 second level menu items:
[Load], [Save], [Insert a word], [Delete a word], [Delete
Words], [Count], [Find], [Clear], [Optimize] and [Expand].
These are the utilities related to base dictionaries.
[Load] Loads a base dictionary into the computer memory.
Current content of the combined base/user dictionary in the
memory is erased. You are prompted to enter the filename.
The default filename is given in the configuration file
jspell.cfg as the 12th entry. The default directory
conforms to the directory searching rule as explained in
(Section II.1.3). Gives warning if the dictionary file is
read-only.
[Save] Saves the current base dictionary in the memory to the
disk. You'll get prompted to enter the file name. If the
dictionary file is read-only, then gives warning and aborts
the save action.
[Insert a word] Inserts a word to the base dictionary. You'll
get prompted to enter the word. The TeX-mode is always
assumed.
[Delete a word] Deletes a single word from the base
dictionary. You'll get prompted to enter the word. The
TeX-mode is always assumed.
[Delete Words] Deletes all words in a file <filename> from
the base dictionary. You'll get prompted to enter the
<filename>. The file <filename> must contain one word per
each line, because only the first legitimate word in a line
is read. The user dictionary need be empty to execute this
menu item. The TeX-mode is always assumed.
[Count] Counts the number of words in the base dictionary that
match the input <pattern>. You'll get prompted to enter a
regular expression for this <pattern>.
[Find] Finds (and displays) the words in the base dictionary
When jspell is used over a network, several users may share the
same base dictionary. So it may not be always the best to merge
all words in all user dictionaries to the base dictionary. The
rule of thumb is that words with general nature should be merged
to the base dictionary and words with personal or special nature
(e.g., friends' names or technical jargons) should be kept in
user dictionaries.
Normally, only one base dictionary should be sufficient for a
language. For instance, american.dic, british.dic, german.dic,
french.dic etc.
** An example of dictionary merging procedure: Suppose that we
want to merge all words of the main user dictionary user.dic to
the base dictionary base.dic. In any directory, start dictman
by the command
dictman
Load the base dictionary by the menu [BaseDic][Load]. Then read
the user dictionary by the menu [UserDic][Read]. Be careful to
check the full pathname of the dictionary files. Merge the user
dictionary to the base dictionary by the menu [UserDic][Merge to
BaseDic]. Now the user dictionary will be empty because all
words have been moved to the base dictionary. Then optimize the
base dictionary by the menu [BaseDic][Optimize].
Finally save the base dictionary by the menu [BaseDic][Save]. At
this point the user dictionary file still exists in the disk.
Delete the user dictionary by a DOS command (after you exit from
dictman). (If you want to keep the old user dictionary file,
then rename user.dic to another, say userold.dic).
III.3.2 Deleting words from a base dictionary
You may want to delete a word from a base dictionary for various
reasons. The obvious situation is that you found a misspelled
word in your base dictionary. No matter how you are cautious,
some words in most user dictionaries (or base dictionaries after
merging) are misspelled. (Typical public domain word lists
contain several misspelled words in every thousand words. Spell
checkers included in leading commercial word processors have
fewer misspelled words but not perfect.)
Also it may happen that you want to delete a correct-spelled
word from your base dictionary. "abut" and "manger" are
examples of such words. They are more likely to be typos of
"about" and "manager" respectively.
There are two menu items in dictman that are used in deleting
words. One is [BaseDic][Delete a word] and the other is
[BaseDic][Delete Words]. Using the first, you can delete a word
that you type in at the prompt. Using the second, you can
delete a list of words saved in a text file, one word per line.
If, for some reason, you have a to-be-deleted-words file that
contains more than one word per line, then use the menus
[UserDic][Read] followed by [UserDic][Save] to obtain a
one-word-per-line text file. (Incidentally, the resulting file
will be alphabetically sorted.)
have obtained a word list in this way, you can build the base
dictionary with decent reliability.
Don't be ambitious to build a large dictionary---because it will
be tedious, unimaginative, time consuming, and (most importantly)
unnecessary.
Appendix A. Networked mode
Let's call the directory in which jspell.exe resides the "jspell
executable directory", and denote it by DIR_EXE. jspell runs in
the networked mode if a file named "network" exists in the
jspell executable directory DIR_EXE. Otherwise jspell runs in
the single user mode. The content of the file "network" does not
matter.
In the networked mode, we use a directory called the "jspell
configuration directory", which is denoted by DIR_CFG. Normally,
this jspell configuration directory DIR_CFG is defined by the
environment variable JSPELL_DIR. For instance, if you want the
jspell configuration directory to be C:\MYDIC, then
set JSPELL_DIR=C:\MYDIC
command should be executed prior to jspell. (Normally, this
should be done at booting time by autoexec.bat.) In case the
environment variable JSPELL_DIR is not defined, then jspell uses
the root directory of the current drive as the default jspell
configuration directory.
jspell.cfg, jsptex.cfg and base.dic are first searched in the
current directory, and then in DIR_CFG. So each user can set
his/her own configuration by putting personal configuration
files jspell.cfg and jsptex.cfg in the directory DIR_CFG. If
jspell fails to find jspell.cfg, then it'll use the default file
jspell.cfg in DIR_EXE. The same is true for jsptex.cfg and
base.dic.
The main user dictionary is searched in the current directory
and then in DIR_CFG but NOT in DIR_EXE. It's o.k. not to have
the main user dictionary in which case it is simply treated as
empty, and a fresh main user dictionary will be created in
DIR_CFG if a word is put there during a jspell session.
File specific user dictionary search rule is the same as that of
the main user dictionary except that the fresh dictionary is
created (if not already exist) in the current directory instead
of DIR_CFG.
Additional user dictionary search rule is the same as that of
the base dictionary.
Appendix B. Frequently Asked Questions
Q1. Sometimes my computer hangs while loading the base dictionary.
Ans. Some of your utilities, especially TSR's, may be buggy. For
instance, the combination of the expanded memory manager