+ All Categories
Home > Documents > User's guide for JSPELL

User's guide for JSPELL

Date post: 14-Apr-2018
Category:
Upload: negrau72
View: 212 times
Download: 0 times
Share this document with a friend

of 36

Transcript
  • 7/29/2019 User's guide for JSPELL

    1/36

    JSPELL 2.11 (Release date: Oct.21, 1998)

    Copyright 1993-1998 by Joohee Jeong

    Email: [email protected]

    ==========================================================

    Please read 00readme.txt for some important information.

    ==========================================================

    Table of Contents

    Chapter I. Introduction

    1 Features of JSPELL

    2 Installation3 Test drive4 Configuration and hardware compatibility5 Terminologies

    Chapter II. User's guide for JSPELL

    1 Characters, words and dictionaries1.1 Legal characters and legitimate words1.2 Base dictionary and user dictionary1.3 Dictionary loading

    2 TeX-mode2.1 Selecting the TeX-mode

    2.2 Legitimate subwords in TeX2.3 Ignoring the TeX commands2.4 Math ignore mode2.5 Miscellanies

    3 Running JSPELL, the spell checker3.1 Overview3.2 Capitalization of words3.3 Menu3.4 [Replace] and [rePlace all]3.5 Adding spotted word to user dictionaries3.6 Miscellanies

    4 Configuration files and command line options5 Usage tips

    Chapter III. User's guide for dictman

    1 Introduction2 Running dictman, the dictionary manager2.1 [File] menus2.2 [BaseDic] menus2.3 [UserDic] menus2.4 [Utilities] menus2.5 [Help=F1] menus

  • 7/29/2019 User's guide for JSPELL

    2/36

    3 Dictionary maintenance3.1 Merging user dictionary to base dictionary3.2 Deleting words from a base dictionary3.3 Building up your own base dictionary

    Appendix A. Networked mode

    Appendix B. Frequently Asked Questions

    Appendix C. History

    Chapter I. Introduction ----------------------------------------

    I.1. Features of JSPELL

    (1) Ease of use:Practically you don't need to study or practice anything touse JSPELL proficiently. With JSPELL's on-line help and theintuitive keystrokes, which are indicated by the highlightedletters in the on-screen menu buttons, you will hardly needto read the manual except for the advanced features ofJSPELL, which are not found in other spell checkers. Formouse users, spell-checking with JSPELL can even be fun.

    (2) Speed:JSPELL is fast in dictionary loading, scanning input filesfor misspelled words and finding suggestions for nearmisspelled words. For a typical PC with 386 CPU, JSPELLneeds less than two seconds in loading a 40,000 worddictionary and a fraction of a second in building anddisplaying the list of suggested words for a misspelled word.

    (3) Dictionary:A unique feature of JSPELL is its ability to handle filespecific dictionary and multiple user dictionaries---you canhave a dictionary (or dictionaries) that are specific to the

    input file. The author of JSPELL found this feature veryconvenient, more than he initially imagined. The accompanyingdictionary manager dictman is powerful and easy to use.Merging your personal dictionaries to the space/time-efficient base dictionary and/or building your own basedictionary from scratch is done effortlessly.

    (4) TeX support:Ignoring the TeX-commands (that start with the backslashes`\') is just the beginning. Refer to (Section 2.2) of thismanual for the complete description of how JSPELL handles TeXdocuments.

    (5) Foreign characters:Foreign characters can be handled in either(i) extended ASCII characters, or(ii) TeX commands (e.g., G\"odel, Erd\H{o}s).

    (6) Undo:Not all popular spell checkers support undoing the previousactions---up to 400 steps! Moreover, JSPELL always displaysthe last action at the bottom row of the screen for addedconvenience.

  • 7/29/2019 User's guide for JSPELL

    3/36

    (7) Network support:Each user can have his/her own configuration and personaldictionary while sharing the executables and the basedictionary 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 managercan display all words in the dictionary that match the givenregular expression: e.g., the pattern "t???e" will give youthe list of all 5 letter words that start with `t' and endwith `e', such as "table", "taste", "tease", "tense" etc., injust 3 to 5 seconds for a typical 386 machine. Imagine whatyou 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:\JSPELLshould contain the following 9 files

    ------------------------------------------------------------------filename description

    ------------------------------------------------------------------00readme.txt readme file

    base.dic English word listdictman.exe the dictionary manager executablejspell.cfg configurationjspell.exe the spell checker executablejspell.hlp help message filejsptex.cfg TeX configurationmanual.txt manualsample.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 filesJSPELL.BAT and DICTMAN.BAT into one of your directories in PATH.

    The content of the batch files jspell.bat and dictman.bat shouldlook like

    @echo offC:\JSPELL\jspell.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

    and

    @echo offC:\JSPELL\dictman.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

  • 7/29/2019 User's guide for JSPELL

    4/36

    respectively.

    The default configuration of JSPELL is set to VGA and AT-keyboard.

    Also we assume that you work under the plain-vanilla English DOSenvironment. If your computer's configuration and/or environmentis 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 screenwill surely look ugly. In this case, use the commandchcp 437

    to get into English mode. To return to Korean mode, usechcp 949

    If you are going to run JSPELL under a networked environment,then please read (Appendix A.) of manual.doc to complete theinstallation.

    In order to print out the documentation file manual.doc, yourprinter must be able to handle the IBM graphic characterscorrectly.

    I.3 Test driveWe assume that JSPELL (and dictman) has been correctly installedon your computer. If not, please refer to the installationinformation in the previous section.

    Also, we suggest you making a hard copy of this documentationfile manual.doc (by a command like "copy manual.doc prn"), atleast this "Test drive" section, with your printer---you can'ttest drive JSPELL while reading this file on a computer screenunless you run two computers simultaneously. In order to printout this documentation properly, your printer must be able tohandle the IBM graphic characters correctly.

    This test drive is for JSPELL only---not for dictman, which willbe needed only after you've determined to use JSPELL as yourspell checker.

    Try the following command at the DOS prompt:

    jspell

    You will see the following screen (and the DOS prompt).

    Usage: jspell [-options...] to spell check , where

    option = -bd -ud -fd -len n (2

  • 7/29/2019 User's guide for JSPELL

    5/36

    Don't worry about the -options for the time being. The Usagetells you that you can spell-check a file, say , bythe command "jspell filename". We will test this on the textfile "sample.txt" which should exist in the same directory asjspell.exe. (It won't take long. After all, you can exit fromthis test drive whenever you want by hitting Alt-X.)

    First, copy this sample file "sample.txt" to the currentdirectory by the command

    copy c:\jspell\sample.txt .

    or something like this. Then execute the following command atthe DOS prompt:

    jspell sample.txt

    Three boxes will be shown on the screen. The upper one is fortext display, the lower left one is for the suggested words, andthe lower right one is for the menu buttons. The row between theupper and lower area is called the "edit row". Each misspelledword in the input file sample.txt will be highlighted in theupper box and also displayed on the edit row. The bottom row isfor 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 misspelledword "jspell" at the center row of the upper box. Also the editrow will display the highlighted word "jspell" with a half-blockcursor flashing at the end of the word.

    Now press DownArrow to highlight the suggested word "spell" andthen press ENTER. You should be able to see that the word

    "jspell" has been replaced by "spell" and the second misspelledword "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 severaltimes in this sample text file. So, hit Alt-U (or click on themenu button [Undo]) to undo the previous action. Then a dialogbox will pop-up at the center of the screen asking us to chooseone 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. Nowwe are back to the previous step. This time, press Alt-G (orclick 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, oro Press the key 1, oro Click left mouse button on the suggested word "typical".

  • 7/29/2019 User's guide for JSPELL

    6/36

    Do any one of these three actions.

    Now we want to add the next spotted/highlighted word "CPU" intothe user dictionary. We do this by pressing Alt-A or clickingon the menu button [Add to user.dic]. Then JSPELL asks us toselect one of the three possible capitalizations "CPU", "Cpu" or"cpu". We should choose the first one, "CPU".

    Next, you will see that the misspelled word "teh" is spotted/highlighted. (By the way, although the previous word "CPU" is nolonger shown on the upper box, we can still see that the lastaction was adding "CPU" to the user dictionary user.dic bylooking at the bottom row.) Note that the row in the upper boxcontaining the spotted word "teh" has two occurrences of theword "jspell" which were not caught because we have ignored"jspell" globally.

    We replace this misspelled word "teh" by the correct word "the"by hitting 6. Then we see that another "teh" is spotted byJSPELL. Thus we realize that we should have done [rePlace all]instead of simple [Replace]. To this end, we first undo thelast action and then hit Alt-P after highlighting "the" in thelower left box (or alternatively, you may click the left mousebutton on the suggested word "the" while pressing down the Ctrl

    key).The next spotted word "jsspell" lies on a rather long line, butJSPELL handles this situation with no problem. In fact, thelimit on the line length in the input file is as large as 512characters. Note that the correct word "jspell" is suggestedalthough it's not in the dictionary. (Recall that "jspell" hadbeen globally ignored.) Now replace "jsspell" by "jspell".

    The rest of this test drive is for the TeX-mode. The currentlyspotted word "sl" is a valid TeX-command. So we could justignore this "sl" or add it to user.dic. But surely there is abetter solution: just ignore all words that follow the backslash

    character `\', namely the TeX-commands.Normally, JSPELL chooses this TeX-mode automatically if (andonly if) the input file name has extension ".tex". But we canforce the TeX-mode by the command line switch -t. So we'll endthis session and spell-check this text file sample.txt again inTeX-mode.

    It's good time to test the [eXit] menu. Hit Alt-X. Then JSPELLwill pop-up a window asking you to choose one of the following:

    Yes (save changes before exit), orNo (do not save changes and exit), or

    Cancel (do not exit, and continue JSPELL).

    We choose the first option "Yes" for now.

    Before starting another JSPELL session, you might want to lookinto your user.dic file in the "jspell directory" to check thatthe word "CPU" has really got in there. Now enter the command

    jspell -t sample.txt

  • 7/29/2019 User's guide for JSPELL

    7/36

    We see that "jspell" is spotted again because [iGnore all] haseffect only on that particular session. So, this time we willput this word "jspell" in the file specific dictionarysample.dic, by hitting Alt-T (or clicking mouse on theappropriate menu button).

    The next spotted word should be "Pythagoras". We put this wordinto sample.dic. (If you are bothered by the jspell's pop-upwindow asking you to choose capitalization, then you may doShift-Alt-T or Shift-LeftMouseClick on [add To sample.dic].)

    Now JSPELL is done with this input file. It will show you someinformation about the session (such as the number of words thathave been spotted etc.) and displays a pop-up window with twochoices Exit and Cancel. If you choose Cancel, then you canundo the last action on "Pythagoras". Otherwise, you just exit.

    Note that JSPELL ignored the 5 words "sl", "XY", "XZ", "YZ" and"Wat" which would have been caught if TeX-mode had not beenused.

    You may want to look into the file sample.dic, which has beencreated in the current directory by this JSPELL session. Itshould contain the two words "Pythagoras" and "jspell". These

    two words are considered to be in our vocabulary for input fileswhose filenames are of the form sample., where is anyextension, including the empty one.

    Note that the original file has been saved in a backup file namedsample.bak in the current directory.

    Remark: In this test drive section, there are three placeswhere we made (slightly) wrong statements---on purpose to avoidexcessive details. We'll continue this practice of deliberatelying to the rest of this manual whenever it is appropriate.

    I.4 Configuration and hardwareJSPELL and dictman need IBM-PC 100% compatible computer becausethey use direct video for fast screen update. Also they uselow-level keyboard reading. Thus some (old) IBM compatiblecomputers may not be able to run jspell/dictman successfully.

    For videos, VGA, EGA, CGA and Hercules are supported. Othervideo cards may or may not work.

    JSPELL uses two configuration files jspell.cfg and jsptex.cfg.Both of these are plain ASCII text files. jsptex.cfg is forTeX-mode only and has nothing to do with the computer hardware.

    In fact, only the first three entries of jspell.cfg arepertinent to the hardware. So we will concentrate on these firstfew lines of jspell.cfg in this section and defer the discussionof the rest until later sections in this manual.

    The configuration variables in jspell.cfg have effect on thebehavior of both JSPELL and dictman. A typical jspell.cfglooks like:

    AT % keyboard (AT or XT)

  • 7/29/2019 User's guide for JSPELL

    8/36

    VGA % video card (CGA,EGA,VGA or Hercules)Enhanced % color option (Standard,Enhanced,Monochrome

    or Laptop)... more ...... more ...

    The meanings of these three configuration variables should bemore or less obvious---if you have an AT-keyboard, then choosethe AT option, otherwise choose the XT option and so on. If youwant change a variable, say AT to XT, then you may simplyreplace "AT" by "XT" using your favorite text editor.

    The order of these configuration variables does matter.So be careful not to mess up the order. Upper/lower-case isignored.

    The difference between AT-keyboards and XT-keyboards is not thatimportant. With AT, you can use certain keystrokes that are notrecognized by XT: e.g., CtrlUpArrow and CtrlDownArrow are onlyrecognized by AT-keyboards.

    For video cards not among the four supported ones, it may stillbe possible to run jspell/dictman by selecting suitable optionsby trial and error. Just note that Enhanced color option is for

    VGA or EGA only.About the color options, many people prefer the Enhanced optionto the Standard option. But if you run JSPELL in a DOS box underWindows (or you just prefer Standard to Enhanced for any reason)then you may switch to the Standard option by simply replacing"Enhanced" by "Standard" in the third line of the filejspell.cfg.

    The Laptop option is basically Monochrome that can't display"bright white" properly. So the command keys are highlighted byinverse video instead of bright white if you choose this Laptopoption.

    I.5 Terminologies

    As you may have already noticed, this manual uses the word"jspell" somewhat ambiguously: sometimes it means thejspell/dictman combo and sometimes it means only the spellchecker jspell.exe. Another example of our abuse of terminologyis the word TeX--- it usually means TeX/LaTeX: for instance, theLaTeX-command \newenvironment is not really a TeX command in thestrict sense, but in this manual we may just say "theTeX-command \newenvironment ..." for convenience.

    We want use the term jspell directory to mean the directory inwhich JSPELL is installed: i.e., the directory in which allJSPELL files reside. But if we think about running JSPELL overa networked environment, where each user may want to updateuser.dic and/or base.dic, it becomes evident that we need somesort of personal jspell directory for each user.

    For the single user mode, jspell directory will mean thedirectory in which the JSPELL executable file jspell.exeresides. It is this directory where the JSPELL files such as

  • 7/29/2019 User's guide for JSPELL

    9/36

    dictman.exe, jspell.cfg, jsptex.cfg and jspell.hlp normallyreside. jspell directory is also the default directory forbase.dic and user.dic.

    For the networked mode, jspell executable directory will meanthe directory in which jspell.exe resides. We must put thefiles dictman.exe and jspell.hlp in this directory. But theother two files jspell.cfg and jsptex.cfg may exist in thejspell configuration directory which is defined by theenvironment variable JSPELL_DIR, which is normally set byautoexec.bat. Also this jspell configuration directory is thedefault directory for base.dic and user.dic.

    For the detailed discussion on this subject, the readers arereferred to (Appendix A.). In (Chapter 2) and (Chapter 3), wewill always assume that JSPELL is being run under the singleuser mode.

    Chapter II. User's guide for JSPELL ----------------------------

    II.1 Characters, words and dictionaries

    II.1.1 Legal characters and legitimate words

    Following are the list of legal characters that can be used inwords:

    abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

    In addition, we may use the following special characters thatcan be used in words in some circumstances:

    " ' - . = \ ^ ` { } ~

    A finite sequence of legal characters and/or special

    characters can be considered to be a legitimate word only if thelength of is in between MinWordLen and 40, whereMinWordLen is some number in between 2 and 9 and defined in theconfiguration file (as the 11th entry). This configurationvariable can be overridden by the command line switch -len Forinstance

    jspell -len 3

    will ignore all words in the text file that has length1 or 2.

    Suppose that has proper length. In non-TeX-mode, the

    only special character that can appear in is theapostrophe ('). Moreover, there's some restriction in the use ofapostrophe in . It must occur at the end of as*n't, *'ve, *'re or *'ll, where * denotes any sequence ofcharacters.

    To summarize, when JSPELL runs in non-TeX-mode, a finitesequence of legal characters and/or apostrophe is alegitimate word if and only if it has length in betweenMinWordLen and 40 and satisfies the condition on apostrophe as

  • 7/29/2019 User's guide for JSPELL

    10/36

    described in the paragraph above.

    In TeX-mode, the definition of legitimate words gets morecomplicated. For this subject, refer to (Section II.2.2) inthis chapter.

    II.1.2 Base dictionary and user dictionary

    Dictionary means a file that contains a list of words in somesystematic way. (Sometimes we may use this term dictionary tomean the list of words in the computer memory that have beenloaded from a dictionary file.)

    Two types of dictionaries are used by jspell: one is "basedictionary" and the other is "user dictionary".

    Base dictionary exploits the common prefix/suffixes of words toreduce the file size. (Current version of jspell supports onlyEnglish prefix/suffix. Future versions will allow userconfigurable prefix/suffix for foreign languages.) Also loadinga base dictionary is fast because it is read into the memorydirectly (i.e., no computation for building up data-structures).If you want to make any change on the content of base

    dictionary, then it must be done by dictman, the dictionarymanager for jspell.

    To see the extent of the space saving obtained by thisprefix/suffix business, run the [BaseDic][Expand] menu indictman. It will create an ASCII text file that contains allwords in the base dictionary currently loaded in the computermemory.

    User dictionary is simply an ASCII text file that contains oneword per line. The words are alphabetically sorted for the easeof maintenance---you can edit this file directly using any texteditor. jspell reads user dictionary line by line. If jspell

    encounters a space character (i.e., space, tab, carriage return,end of line etc.), then it ignores the rest of the line. If anillegitimate word is encountered during loading, then jspellexits with an error message.

    jspell supports the use of "multiple user dictionaries" and the"file specific user dictionary" as explained in the nextsection.

    II.1.3 Dictionary loading

    When jspell starts it looks for the default base dictionary, say

    base.dic, in the current directory, where the default dictionaryname is defined in the configuration file jspell.cfg (as the12th entry). If it finds one, then the base dictionary is loadedinto the computer memory. Otherwise jspell continues searchingbase.dic in the jspell directory. If both searches fail, thenjspell exits with an appropriate error message. You can overridethe default base dictionary name defined in jspell.cfg by thecommand line switch -bd for instance,

    jspell -bd german.dic

  • 7/29/2019 User's guide for JSPELL

    11/36

    will spell-check the file using the base dictionary"german.dic".

    As we mentioned above jspell allows us to use more than one userdictionaries. There is one special user dictionary, called themain user dictionary, which is used for *all* jspell-checksessions. User dictionaries other than the main one may or maynot be used in jspell-checking depending on the filename of theinput text file.

    Dictionary loading of the main user dictionary is similar tothat of base dictionary, with one minor difference explained inthe next paragraph. The default main user dictionary name isnormally user.dic and defined in the configuration filejspell.cfg (as the 13th entry). It can be overridden by thecommand line switch -ud for instance,

    jspell -ud math.dic

    will spell-check the file using the main userdictionary math.dic.

    The difference between the loading of the base dictionary and

    the main user dictionary is that if both searches fail (one inthe current directory and the other in the jspell directory)then jspell exits with an error message in the former case,while in the latter case jspell

    (i) does not complain anything in case the default main userdictionary defined in jspell.cfg has been used,

    (ii) gives warning and option to choose between continue orabort in case the command line defined main userdictionary has been used.

    If the main user dictionary is not found in either of the

    directories but some words are added into the main userdictionary during a spell-check session, then a new dictionaryis created in the jspell directory.

    The default file specific dictionary of a file .is defined to be a user dictionary with filename.dic.

    Dictionary loading of the file specific dictionary, or filedictionary for short, is the same as that of the main userdictionary. The default file dictionary name can be overriddenby the command line switch -fd -fd for instance,

    jspell -fd project1.dic

    will spell-check the file using the file dictionary"project1.dic" (instead of the default one .dic).

    If the file dictionary is not found in either of the directoriesbut some words are added into the file dictionary during aspell-check session, then a new dictionary is created in thecurrent directory. (This is different from the main userdictionary case.)

  • 7/29/2019 User's guide for JSPELL

    12/36

    You may use additional user dictionaries specific to a text file. by specifying them in the file dictionary, say.dic, in the following way, which is how jspellsupports the use of multiple user dictionaries. Suppose thatyou want to use two additional dictionaries "math.dic" and"comp.dic". Then just add two lines +math.dic and +comp.dic atthe beginning of the file dictionary .dic---so thecontent of the resulting file dictionary for our input file. should look like:

    +math.dic+comp.dic......

    As usual, these additional user dictionaries are first searchedin the current directory and then in the jspell directory. Ifboth searches fail, then jspell exists with an error message. Upto 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. Soif these two dictionaries happen to have the same filename, thenthe filename collision problem occurs, and jspell exists with anappropriate error message. Other types of dictionary namecollision is less harmful and thus silently ignored by jspell.(Some computing resources are wasted due to the duplicate copyof the same dictionary.)

    Since user dictionaries (main, file, or additional) can befreely edited by any text editor, there is a possibility that anillegitimate word creeps into one of these dictionaries. Ifjspell finds an illegitimate word during the initial dictionaryloading, then it exits with an error message at the bottom of

    the screen indicating the first encounter of (i) theillegitimate word , (ii) the dictionary that contains and (iii) the line in which occurs. Youshould immediately delete or fix this .

    If the same word exists in more than one places---in differentdictionaries or in the same dictionary---then it is silentlyignored by jspell. (Some computing resources are wasted due tothe duplicate copy of the same word.)

    One final remark: extension of dictionary files need notnecessarily be .dic. It's just convenient to stick to thisnaming convention in most situations.

    II.2 TeX-mode

    II.2.1 Selecting the TeX-mode

    This mode is automatically selected if the extension of theinput file is ".tex", case insensitive. You may override thisconvention by the command line switch -t[+-]. For instance,you may force the TeX-mode to the file . by

  • 7/29/2019 User's guide for JSPELL

    13/36

    jspell -t .

    Conversely, you may force non-TeX-mode to the file.tex by

    jspell -t- .tex

    -t+ has the same effect as -t.

    II.2.2 Legitimate subwords in TeX

    First of all, any legitimate word in non-TeX-mode is legitimatein the TeX-mode also.

    In addition, we can use the accenting commands as part of alegitimate word. Thus the following 21 strings are legitimatesubwords

    \` \`{?} \' \'{?} \^ \^{?} \"\"{?} \~ \~{?} \= \={?} \. \.{?}\u{?} \v{?} \H{?} \c{?} \d{?} \b{?} \t{??}

    where ? denotes any single character.Next, there are 11 special TeX commands that are legitimatesubwords:

    \oe \OE \ae \AE \aa \AA \o \O \l \L \ss

    which are used to generate the following symbols

    * omitted in this ASCII version of the manual *

    respectively.

    Further, we allow the use of braces { and } for variouscircumstances like \ss{}, {\oe} etc.

    Finally, we allow the hyphenation command \- to be part oflegitimate words.

    II.2.3 Ignoring the TeX commands

    First of all, jspell ignores all TeX (and LaTeX) commands(except the 11 special ones mentioned in the previous section):i.e., all words following the escape character `\'. Note that if`\' is not used as an escape character, as in the second

    occurrence in the command `\\', jspell doesn't ignore thesubsequent word---this is illustrated in the following example:

    We explain \fbox{gnus} in the next line. \\THis is ...

    jspell will ignore the command "fbox" but catch "THis" as amisspelled word.

    Some TeX commands take arguments which need not be usual words.For instance, in the text

  • 7/29/2019 User's guide for JSPELL

    14/36

    On this topic, readers are referred to \cite{Knu88a} ...

    we want the word "Knu" be ignored. So jspell will ignore an appearing as \cite{}. Since itself maycontain { and }, the exact rule is: ignore until the first rightbrace that matches the first left brace after the command \cite,where literal braces following the escape character \ are notcounted.

    Some TeX commands take more than one arguments. jspell takesthis into account too: e.g., it ignores and appearing as

    \newcommand{}{}

    Note that and/or can be rather long and may spanseveral lines.

    We call this number of arguments of a TeX command "arity". Thearity of \cite is 1, the arity of \newcommand is 2, and thearity of \newenvironment is 3 etc. In fact these arities ofTeX commands are user definable by editing the configurationfile "jsptex.cfg". If a line in jsptex.cfg is

    mycommand,

    where is a numeral, then the arity of \mycommand will be setto be . An exception to this is the = 0 case. This issupplied to treat some commands like \input that has fuzzysyntax. (Both "\input " and "\input{}" areaccepted.) Following are the the default arity/command pairsdefined in jsptex.cfg.

    0input1include1includeonly

    1documentstyle1newcounter1hyphenation1label1ref1bibitem1pageref1cite1nocite2newcommand2renewcommand2newtheorem3newenvironment

    3renewenvironment

    The commands \begin and \end are treated specially. The arity of\begin is not fixed---normally it is 1, but sometimes it can be2 as you can see in the following example:

    \begin{array}{llcr}

    We don't want to see jspell reporting "llcr" as a misspelledword. A similar situation arises when "array" in the example

  • 7/29/2019 User's guide for JSPELL

    15/36

    above is replaced by one of "tabular", "figure" and "table".Another thing that we should consider is that the commands\begin and \end are used in setting on/off math ignore mode,which is explained in detail in the following section.

    So these two special commands \begin and \end are hard-coded injspell and do not appear in the TeX command configuration filejsptex.cfg.

    The number of commands that are accepted in jsptex.cfg canbe 32 at maximum.

    II.2.4 Math ignore mode

    By default, jspell do not spell-check text in math mode which isdefined by one of the followings:

    $ $$$ $$\( \)\[ \]\begin{math} \end{math}\begin{equations} \end{equation}

    \begin{eqnarray} \end{eqnarray}\begin{eqnarray*} \end{eqnarray*}

    Math mode across multiple lines are supported of course.

    The reason why jspell ignores text in math mode is that manynonwords may occur in math mode as in the following example:

    $$ {\sl XY}^2 + {\sl XZ}^2 = {\sl XZ}^2 $$

    On the other hand, we may want jspell not ignore the text inmath mode in the following example:

    $$ {\sl base}^2 + {\sl height}^2 = {\sl hypotenus}^2 $$(Note the typo "hypotenus" in math mode.) If you prefer todisable this math mode ignoring feature of jspell, then you cando so by editing the configuration file jspell.cfg, the sixthentry, to replace MathIgnore by MathNoIgnore.

    Alternatively math ignoring can be set/unset by the command lineswitch -math[+-]

    jspell -math+

    will force jspell to spell-check text in math mode and

    jspell -math-

    will force jspell to ignore text in math mode. The switch-math has the same effect as -math+.

    II.2.5 Miscellanies

    TeX ignores any input after the percent symbol % until the end

  • 7/29/2019 User's guide for JSPELL

    16/36

    of line. So it could be desirable for jspell to follow thisafter-%-ignoring convention of TeX. For example, we can think ofthe following situation:

    Send \$25.00 to ... % don't forget \ before $Here is a tyypo ...

    If jspell gets no effect from %, then it will think that thelast character $ on the line containing % starts math mode, andthus the word "tyypo" would not be caught as a misspelled word(assuming that the math ignore mode is on).

    This after-%-ignore mode is set by the 10th entry of theconfiguration file jspell.cfg: if it is pIgnore, then jspellignores characters in a line after the first nonliteraloccurrence of %, and if it is pNoIgnore then % has no specialeffect on the behavior of jspell.

    You can override this by the command line switch -percent[+-].The switch -percent (or equivalently -percent+) set's theafter-%-ignore mode on regardless of what's been defined by theconfiguration file jspell.cfg. The switch -percent- is theopposite of -percent+.

    We don't claim that jspell can handle all possible situations ofTeX appropriately. For instance jspell doesn't understand thefollowing (unnatural) construction:

    ... the following displayed equation $% some comment$ x^2 + y^2 = z^2. $$ It is believed that aboveargument was first invented by ...

    jspell thinks that "some comment" is in math mode and "It isbelieved ..." is the beginning of displayed math mode, which isabsurd. So if you are determined to fool jspell, then it'srelatively easy to do so by using the comment character %---onthe other hand such a situation (that jspell is fooled) will

    seldom occur unless you intentionally create that.

    II.3 Running jspell, the spell checker

    This section describes the detail of the usage of the spellchecker jspell. If you use jspell for the first time, thenperhaps the earlier section Test drive will be sufficient foryou.

    II.3.1 Overview

    To jspell-check an ASCII file , you first go to the

    directory in which resides and then enter the command

    jspell [-options...]

    at the DOS prompt. ( may contain path. In this caseyou don't have to go to the directory of of course.)

    The [-options...], which have been mentioned at least once inearlier sections, will be explained in detail in the nextsection.

  • 7/29/2019 User's guide for JSPELL

    17/36

    In a typical situation of a jspell session, a misspelled word in (assuming that at least one misspelled wordexists) is highlighted and shown together with the surroundingtext in the 78x11 sized box occupying the upper half of thescreen. is also displayed in the row at the middle ofthe screen right below the upper box, namely the edit row. Alsothe action of the user on the previous misspelled word isdisplayed at the bottom of the screen (unless is thefirst misspelled word in ).

    Words in the jspell's dictionary that are *close* to aredisplayed in the lower left box: i.e., the suggestion area. Upto 16 suggested words can be displayed. Under the "Numbered"option (which is the default), the highlighted numeral n isshown in front of the n-th suggested word. (For n > 8, @m isshown in place of n where m := n - 8.) These numerals give us ahandy way of selecting a word from the list of the suggestedwords. We will discuss this in detail in (Section II.3.4). Youmay disable this Numbered option by editing the 9th entry of theconfiguration 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 whenthere are more than 8 suggested words, then this limit L reducesto 17 under the Numbered option and 19 under the NoNumberedoption.

    The third box in the lower right part of the screen shows menubuttons. Each menu button contains exactly one uppercaseletter, which is highlighted (or inverse-video'ed for Laptopcolor option). This capitalized letter is the command key forthat menu. More on this in the next section.

    The time necessary for jspell to prepare a suggested words listis normally less than a fraction of a second for usual 386

    machines. But for longer words (with length, say > 10) andslower machines, it might take several seconds. Sometimes,immediately after a word is spotted, you may realize that it'snot really a typo, and you are going to ignore it or add to auser dictionary. So, naturally, you don't want to waste timewaiting for jspell to finish the preparation of the suggestedwords list. In this case, you can just go ahead and do theappropriate action by pressing a command key or clicking theleft mouse button. Then jspell will abort preparing thesuggested 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 .bak(assuming that the input file has filename .) if(and only if) the "BackUp" option is selected, which isset/unset by the 7th entry of the configuration file jspell.cfg.The backup file .bak is created in the same directoryas the input file.

  • 7/29/2019 User's guide for JSPELL

    18/36

    II.3.2 Capitalization of words

    We define four types of words according to the capitalizationas follows. A word has capitalization type:

    "no-cap" if no uppercase letter appears in ,(e.g., apple)

    "first-only-cap" if the first letter of is theonly uppercase letter appearing in , (e.g., Berlin)

    "all-cap" if all letters of are uppercase,(e.g., IBM)

    "oddly-cap" otherwise. (e.g., TeX)

    How jspell handles the capitalization is best explainedthrough an example:

    word in dictionary jspell recognizes jspell spots 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 clickingthe left mouse button. The location of the currentlyhighlighted area, as well as the key pressed or mouse buttonclicked, affects the action. For instance, pressing the commandkey ENTER adds the spotted word into the userdictionary if the menu button [Add to user.dic] isbeing highlighted at that moment, but replaces bya suggested word if the suggested word is being highlighted. You can move the

    highlighted area by arrow keys.From now on, "use the menu button " means "clickthe left mouse button on or press ENTER while is being highlighted".

    If you press a key that is not a command key or click a mousebutton when the mouse location is irrelevant, then it will besilently 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 byhitting ESC or get the second level help screen byhitting F1 again. Clicking the right mouse button hasthe same effect as hitting ESC.

    Edit: When the edit row is being highlighted, you can editthe spotted/highlighted word in the edit row. You can typein any legal characters and special characters. If youhave a US-keyboard and wants to enter extended ASCIIcharacter, then type in the corresponding ASCII code using

  • 7/29/2019 User's guide for JSPELL

    19/36

    the numeric keys while holding down the Alt key: e.g., youmay use Alt-129 for entering umlaut u.

    If you want to insert a space inside a spotted word,then use Shift- instead of . This is because is a command key for [Ignore].

    You can toggle between the insert mode and theoverstrike mode by hitting the INS key. The cursoris a half-block in the insert mode and an underscore in theoverstrike mode.

    The usual editing keys like LeftArrow, RightArrow,HOME, END, Backspace, DEL, Ctrl-Backspace, Ctrl-T work asexpected. ESC key clears the edit row. If ESC is pressedwhile the edit row is empty, then it works as an [Ignore]key.

    You may move the cursor by clicking the left mousebutton on the position you want. (This cursor movement bymouse clicking should work even when the edit row is notbeing highlighted.)

    Ignore: You can ignore the currently spotted word by hittingAlt-I or . Alternatively, you may use the menubutton [Ignore].

    Global ignore: You can ignore the currently spotted word to

    the rest of the file by hitting Alt-G or Ctrl-.Alternatively, you may use the menu button [iGnore all].

    Replace: Refer to (Section II.3.4).

    Global replace: Refer to (Section II.3.4).

    Mark: Sometimes you may not be sure whether the spotted wordis misspelled or not, and you don't have a dictionary athand. In this case you can "mark" the word by hittingAlt-M. Then the spotted word will be marked by appending"QQ" at the end. Alternatively, you may use the menubutton [Mark]. Later you can change this marked word

    appropriately using a text editor.Global mark: You can mark the currently spotted word

    and all the subsequent occurrences of by pressingthe key Alt-K. Alternatively, you may use the menu button[marK all].

    Add the spotted word into the main user dictionary:Refer to (Section II.3.5).

    Add the spotted word into the file specific dictionary]Refer to (Section II.3.5).

    Undo: You may undo your last action, which is alwaysdisplayed at the bottom of the screen, by pressing Alt-U.Alternatively, you may use the menu button [Undo]. A windowwill pop-up asking you to choose one among the threeoptions "Undo", "Cancel" or "Undo further", whose meaningsshould be obvious. Up to 400 levels of undoing is allowed.

    Exit: You may exit from jspell before finishingspell-checking the current input file by hitting Alt-X, oralternatively, by using the menu button [eXit]. A window

  • 7/29/2019 User's guide for JSPELL

    20/36

    will pop-up asking you to choose one among the threeoptions:

    Yes (save changes before exit), orNo (do not save changes and exit), orCancel (do not exit, and continue jspell).

    By "change" we mean any replacement of words and/oraddition of words to user dictionaries (main userdictionary or file specific dictionary).

    Among these twelve possible user actions, some need moredetailed explanations, which are given in the following twosections.

    When you are done with the last misspelled word in the inputtext file, jspell opens a dialog box asking you to choose "Exit"or "Cancel", thereby giving you a chance of undoing the lastaction. Also jspell shows some information about the sessionsuch as the number of words processed, number of words added tothe main user dictionary etc.

    II.3.4 [Replace] and [rePlace all]

    There are various ways of replacing the spotted word by acorrectly spelled word.

    First, if you want to replace by the word in the editrow, then you may do so, by

    (i) pressing ENTER or Alt-R while the edit row ishighlighted, or

    (ii) use the menu button [Replace].

    (If the word in the edit row is the same as the spotted word,then jspell actually [Ignore]s instead of [Replace]ing.)

    Second, if you want to replace by one of the suggestedwords, then you may do so by one of the following three methods:

    (i) hitting the highlighted (or Alt'ed and highlighted)numeral in front of the wanted word, or

    (ii) highlight the wanted word and press ENTER or Alt-R orclick on the menu button [Replace], or

    (iii) just click on the wanted word in the suggestion area.

    The menu [rePlace all] is just the global version of [Replace].Note note that global replacement by a suggested word can bedone by clicking mouse on that word while pressing down the Ctrl

    key.

    Things get a little bit complicated if the "correct word" youwant to replace is illegitimate or not in the dictionary. Inthe first case jspell asks the user confirmation. In the lattercase, jspell opens a pop-up window asking you to choose one ofthe following:

    Add to "" and Replace, orAdd to "" and Replace, or

  • 7/29/2019 User's guide for JSPELL

    21/36

    Ignore and Replace, orCancel.

    The meanings of these four options should be obvious. Such a"composite action" can be undone by user's request, like anyother actions, of course.

    II.3.5 Adding spotted word to user dictionaries

    When the user wants to add a new word to the dictionary, theuser has the option of choosing the main user dictionary or thefile specific user dictionary. You may do these actions by themenu [Add to ] or [add To dic]whichever is appropriate.

    If the spotted word has capitalization type "first-only-cap" or"all-cap", then jspell asks the user to choose the actualcapitalization type to be put into the dictionary. Note that an"oddly-cap"ped word, as well as a "no-cap"ped word, is directlyput into the dictionary without such a confirmation step.

    If a word with the capitalization type first-only-cap or all-capis spotted and you want to add this word to a user dictionary

    (main user or file specific) without altering the capitalizationtype, then you probably don't want be bothered by the dialog boxwhich asks you to choose the actual capitalization type. Inthis case you may skip the confirmation step by doing the action(either by command key or by mouse click) while pressing downthe Shift key. (Recall that the Shift key has something to dowith the upper/lower case of letters.)

    If the main user dictionary is initially empty but some wordsare added in there during a jspell session, then a fresh mainuser dictionary is created in the jspell directory (assumingthat the file/path-name is allowed by DOS). If the file specificdictionary is initially empty but some words are added in there

    during a jspell session, then a fresh file specific dictionaryis created in the current directory (with a similar assumptionon the file/path-name).

    II.3,6 Miscellanies

    One of the first things that jspell does at the beginning of asession is to check whether the input file is really an ASCIItext file. jspell does this ASCII-test by examining the first1024 bytes of the input file. If the NULL character exists inthis beginning part of the input file, then jspell exits with anappropriate error message.

    There are certain restrictions to the input file, say. If is read-only (i.e., not rewritable),then jspell exits with the message

    "" is READ_ONLY

    This is because the changes made by jspell cannot be saved inthe read-only file . A similar test is done onthe main user dictionary and the file specific user dictionary.

  • 7/29/2019 User's guide for JSPELL

    22/36

    When the backup option is set, and if the input file hasextension ".bak", then there is no way to make any change to theinput file and at the same time keep the backup copy of theoriginal with the filename .bak. In this situation,you'll be warned: that is, you'll have the option of disablingthe 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 thememory is used as input file buffer. If the input file size isso large that the input file buffer gets full while runningjspell, then the overspilt text is saved to the disk. You can'tundo an action made on this already-saved part of the text. Buteven if the buffer gets full and some part of the text is savedto the disk, if you abort jspell by the menu [eXit] and choosenot to save the changes made so far, then it'll work without anyproblem: 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 anytext editor. The configuration files should exist in the jspelldirectory. But the current working directory is first searchedas usual.

    In each lines of these two configuration files, if a spacecharacter or the TeX comment character % is encountered then therest of the line is ignored. In particular, if a line startswith a space of %, then the whole line is ignored.

    If any illegitimate entry is found in a configuration file, thenjspell exists with an error message showing where it has

    happened. It should be stressed that the order of the entriesin the configurations files is important. Be careful not tomess 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 typicaljspell.cfg file is shown below:

    AT %1. keyboard (AT or XT)VGA %2. video card (CGA,EGA,VGA or Hercules)Enhanced %3. color option (Standard, Enhanced, Monochrome

    or Laptop)10 %4. (0-99) (pop-up window explosion speed,

    delaying interval)*.dic *.txt %5. dictionary filenames patternMathIgnore %6. MathIgnore or MathNoIgnore

    (math ignore in TeX)BackUp %7. BackUp or NoBackUp8 %8. (1-16) TabSizeNumbered %9. Numbered or NoNumbered (suggested word list)pNoIgnore %10. pIgnore or pNoIgnore ('%' ignore in TeX)2 %11. (2-9) Minimum word lengthbase.dic %12. default base dictionary

  • 7/29/2019 User's guide for JSPELL

    23/36

    user.dic %13. default main user dictionary> %14. lines starting with this string are ignored

    The first three entries have already been explained fully in(Section I.4).

    The fourth entry is the delay interval (in milliseconds) of theexplosion speed of pop-up windows. It must be an integer inbetween 0 and 99. Smaller value results in faster explosion.

    The fifth entry is for dictman only, and hence will not beexplained here.

    The sixth entry is used to set/unset the math ignore mode. Itshould be either MathIgnore or MathNoIgnore. This has effectonly when the TeX mode is used.

    The seventh entry is used to set/unset the backup mode. Itshould be either BackUp or NoBackUp. If the backup mode is set,then a jspell leaves a backup .bak of the originalinput file .. Otherwise no backup file will beleft. This has no effect on dictman.

    The eighth entry is the tab size. If the input text file

    contains the tab characters (ASCII code 9), then it is expandedto n spaces where n is the number specified by this entry. Werequire 1

  • 7/29/2019 User's guide for JSPELL

    24/36

    The main user dictionary name is overridden by the switch -ud:

    jspell -ud ...

    MinWordLen is overridden by the switch -len:

    jspell -len n ...,

    where 2

  • 7/29/2019 User's guide for JSPELL

    25/36

    Each user dictionary can hold fairly large number of words---thelimit is 5,000. But it's a good idea to use user dictionariesonly for technical words (used in various disciplines of sciencesuch as mathematics, medicine, psychology etc.) or personalwords (like your friend's names). Words with general natureshould be merged to a base dictionary using the accompanyingdictionary manager dictman. This is because there is asubstantial difference in the speeds of loading basedictionaries and user dictionaries---base dictionaries areloaded into computer memory much faster. (This has beendiscussed in (Section II.1.2). Note that once the dictionariesare loaded into computer memory, there is no speed penalty forhaving lots of words from user dictionaries.) Also you can getsignificant space savings, both in disk and in the computermemory, by this dictionary merging.

    The rest of this section is devoted for TeX-mode.

    When spell-checking a TeX document (with lots of mathematics),it's in general better to run TeX before jspell. For instance,if you ended a math mode started by \begin{eqnarray} with\end{eqnarray*} by mistake, then jspell will ignore all the restof the file starting from \begin{eqnarray}. Such a pitfall can

    be avoided by spell-checking only TeX-correct files.Another hard-to-catch pitfall may occur when you use the TeXcommands in the verbatim mode. This manual uses tons of suchconstructions.

    Sometimes we need to use a misspelled word in a document. Forinstance, this manual used the misspelled word "teh" severaltimes. But it is not a good idea to put this word "teh" inthe file dictionary because that would let genuine typos of"teh" unspotted by jspell. One way to overcome such aproblem is to use a dummy TeX-command with arity 1: that is,define a command \dummy by

    \newcommand{\dummy}[1]{#1}

    Then put a line

    1dummy

    in the TeX configuration file jsptex.cfg. Then whenever amisspelled word, say "teh", needs to be used in the document,use \dummy{teh}. This command \dummy can be conveniently usedin ignoring parts of the input text in other situations---forinstance, a program listing in verbatim mode.

    Even if it is TeX-correct, there is some possibility that jspellis fooled: for instance, TeX doesn't complain anything (andproduces the correct .dvi file) if you begin a math mode by $and end it by \). But jspell is less tolerant on this kind ofasymmetry. Other ways of fooling jspell by use of the TeXcomment character % has been discussed already in (Section II.2.5).

    Chapter III. User's guide for dictman ---------------------------

  • 7/29/2019 User's guide for JSPELL

    26/36

    III.1. Introduction

    Entering the command

    dictman ?

    at the DOS prompt displays the following on the screen:

    Usage: dictman [-options...]option = -len n (2

  • 7/29/2019 User's guide for JSPELL

    27/36

    For example, [File][Clear Screen] menu, which is used to clearthe main display area, can be shown by pulling down the firstlevel menu item [File].

    The main display area saves the previous 200 lines---you canscroll back and forth using the keys Ctrl-UpArrow,Ctrl-DownArrow, PageUp, PageDown, Ctrl-PageUp and Ctrl-PageDown.(If you use XT-keyboard, then use Shift-UpArrow andShift-DownArrow instead of Ctrl-UpArrow and Ctrl-DownArrowrespectively.)

    Regular expressions are used frequently in dictman. Ourconvention on regular expressions are as follows:

    * matches any string,? matches any single letter,[] matches a single letter as in the

    following examples:[arD] matches `a', `r' and `D'.[p-s] matches `p', `q', `r' and `s'.[3-5p-sXQa] matches `3', `4', `5' `p', `q', `r', `s',

    `X', `Q' and `a'.\ is the escape character: for instance, the regular expression\*[a-c\-]?\\ matches any string of length 4 that starts with

    `*', ends with `\' and has `a', `b', `c' or `-' as the 2ndcharacter.

    Note that we use above convention for filenames too. This is alittle bit different from the usual DOS file name wild cardconvention. For instance the regular expression `*' matches allfiles in dictman, but it only matches files with no extension inusual DOS environments.

    III.2 Running dictman, the dictionary manager

    In this section, all the menu items are explained. Some of the

    more important items are briefly explained here and thenrevisited (with details) in later sections.

    For the basic (but technical) definitions of words anddictionaries, the readers are referred to (Section II.1).

    When dictman starts, you will see five first level menu items:[File], [BaseDic], [UserDic], [Utilities] and [Help=F1]. Welook at each of these five in the following subsections.

    III.2.1. [File] menus

    Under this menu File], there are 4 second level menu items:

    [Directory], [Clear Screen], [Save Screen] and [Exit=Alt-X].These are the utilities related to files or the main displayarea.

    [Directory] This menu item displays the directory listing offiles x such that

    (i) the filename of x matches the current dictionary namepattern, and

    (ii) x exists in the current directory or in the jspelldirectory.

  • 7/29/2019 User's guide for JSPELL

    28/36

    You'll get prompted toenter the dictionary name pattern in a dialog box. The defaultpattern is given in the configuration file jspell.cfg as the 5thentry. More than one regular expressions separated by spaces areallowed in this pattern.

    [Clear Screen] Clears the main display area.

    [Save Screen] Saves the current content of the main displayarea to a file "snapshot.0". If snapshot. exists already,then it is saved as snapshot., where n = 0, ... 8. Ifyou execute this menu item when n reached 9, then it iswritten over snapshot.0 with a warning message.

    [Exit=Alt-X] Exits dictman. Asks whether to save any changemade 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], [DeleteWords], [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 thememory is erased. You are prompted to enter the filename.The default filename is given in the configuration filejspell.cfg as the 12th entry. The default directoryconforms to the directory searching rule as explained in(Section II.1.3). Gives warning if the dictionary file isread-only.

    [Save] Saves the current base dictionary in the memory to thedisk. You'll get prompted to enter the file name. If thedictionary 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 alwaysassumed.

    [Delete a word] Deletes a single word from the basedictionary. You'll get prompted to enter the word. TheTeX-mode is always assumed.

    [Delete Words] Deletes all words in a file fromthe base dictionary. You'll get prompted to enter the. The file must contain one word per

    each line, because only the first legitimate word in a lineis read. The user dictionary need be empty to execute thismenu item. The TeX-mode is always assumed.

    [Count] Counts the number of words in the base dictionary thatmatch the input . You'll get prompted to enter aregular expression for this .

    [Find] Finds (and displays) the words in the base dictionarythat match the input . You'll get prompted to

  • 7/29/2019 User's guide for JSPELL

    29/36

    enter a regular expression for this . Up to 80words can be displayed.

    [Clear] Clears the base dictionary from the computer memory.

    [Optimize] Using common prefix/suffixes, optimizes the basedictionary. For instance, "wanted" is absorbed to "want"(assuming that both words exists). Substantial space savingis obtained by doing this. (For English only in the currentversion.) The user dictionary need be empty to execute thismenu item.

    [Expand] Write the entire content of the base dictionary inthe computer memory to a text file, one word per each line,sorted alphabetically. You'll get prompted to enter thefile name.

    III.2.3. [UserDic] menus

    Under this menu [UserDic], there are 7 second level menu items:[Read], [Save], [Count], [Find], [Clear] and [Merge to BaseDic].These are the utilities related to user dictionaries.

    [Read] Reads a text file and inserts all new legitimate wordsin it, that are NOT already in the combined base/userdictionary, into the user dictionary. Existing data are notcleared. You'll get prompted to enter the file name. Warns ifthe file is read-only. The TeX-mode is assumed unless thecontrary is forced by the command line switch -t-. Since auser dictionary can hold at most 5,000 words, all words in theuser dictionary are automatically moved to the base dictionaryeach time the user dictionary gets full (i.e., reaches the5,000 word limit). So, for instance, if 11,200 words are readfrom a text file using this menu item, then 10,000 words willbe read into the base dictionary and the remaining 1,200 wordswill be read into the user dictionary .

    [Save] Saves the user dictionary in the computer memory to adisk file. You'll get prompted to enter the file name. If thefile is read-only, then gives warning and aborts the saveaction.

    [Count] Counts the number of words in the user dictionary thatmatch the input . You'll get prompted to enter aregular expression for this .

    [Find] Finds (and displays) the words in the user dictionarythat match the input . You'll get prompted to entera regular expression for this . Up to 80 words can

    be displayed.

    [Clear] Clears the user dictionary from the computer memory.

    [Merge to BaseDic] Merges (i.e., moves) all words from the userdictionary to the base dictionary. Normally, you shouldexecute the menu item [BaseDic][Optimize] right after this.

    III.2.4. [Utilities] menus

  • 7/29/2019 User's guide for JSPELL

    30/36

    Under this menu [Utilities], there are 5 second level menuitems: [Legal Characters], [Legitimacy], [Count], [Find] and[Clear]. These are the utilities related to the combinedbase/user dictionaries.

    [Legal Characters] Prints all the characters (legal and/orspecial), with their ASCII codes, that can be used in words.

    [Legitimacy] Tests whether a word is legitimate. You'll getprompted to enter the word. The TeX-mode is always assumed.

    [Count] Counts the number of words in the combined base/userdictionary that match the input . You'll getprompted to enter a regular expression for this .

    [Find] Finds (and displays) the words in the combined base/userdictionary that match the input . You'll getprompted to enter a regular expression for this .Up to 80 words can be displayed.

    [Clear] Clears the combined base/user dictionary from thecomputer memory.

    III.2.5. [Help=F1] menus

    Under this menu [Help=F1], there are 5 second level menu items:[About], [Getting Help], [Keyboard & Mouse], [Configuration] and[Manual]. These are the on-line help messages of dictman.

    [About] About dictman.

    [Getting Help] How to get on-line help.

    [Keyboard & Mouse] Explains the basic usage of the keyboard andthe mouse in dictman.

    [Configuration] Some information on hardware compatibility andconfiguration.

    [Manual] A short manual of dictman.

    III.3. Dictionary maintenance

    III.3.1. Merging user dictionary to base dictionary

    Although each user dictionary can hold up to 5,000 words, it's agood idea to keep the size of a user dictionary far less than

    this limit. The reason is two-fold: first, dictionary loadingof base dictionary is several times faster than that of userdictionary. Second, base dictionary is more space efficient thanuser dictionary. This is due to the inherent structuraldifference between the two types of dictionaries. Basedictionary is built to be efficient in space and time. Userdictionary is built for easy maintenance---it can be managed bydirect editing by any text editor.

    When jspell is used over a network, several users may share the

  • 7/29/2019 User's guide for JSPELL

    31/36

    same base dictionary. So it may not be always the best to mergeall words in all user dictionaries to the base dictionary. Therule of thumb is that words with general nature should be mergedto the base dictionary and words with personal or special nature(e.g., friends' names or technical jargons) should be kept inuser dictionaries.

    Normally, only one base dictionary should be sufficient for alanguage. For instance, american.dic, british.dic, german.dic,french.dic etc.

    ** An example of dictionary merging procedure: Suppose that wewant to merge all words of the main user dictionary user.dic tothe base dictionary base.dic. In any directory, start dictmanby the command

    dictman

    Load the base dictionary by the menu [BaseDic][Load]. Then readthe user dictionary by the menu [UserDic][Read]. Be careful tocheck the full pathname of the dictionary files. Merge the userdictionary to the base dictionary by the menu [UserDic][Merge toBaseDic]. Now the user dictionary will be empty because allwords 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]. Atthis point the user dictionary file still exists in the disk.Delete the user dictionary by a DOS command (after you exit fromdictman). (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 variousreasons. 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 aftermerging) are misspelled. (Typical public domain word listscontain several misspelled words in every thousand words. Spellcheckers included in leading commercial word processors havefewer misspelled words but not perfect.)

    Also it may happen that you want to delete a correct-spelledword from your base dictionary. "abut" and "manger" areexamples 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 wordthat you type in at the prompt. Using the second, you candelete 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 thatcontains more than one word per line, then use the menus[UserDic][Read] followed by [UserDic][Save] to obtain aone-word-per-line text file. (Incidentally, the resulting filewill be alphabetically sorted.)

  • 7/29/2019 User's guide for JSPELL

    32/36

    III.3.3. Building up your own base dictionary

    This section is about building up a base dictionary startingfrom scratch. You will definitely need to do this if you useany language other than English (in fact, American English).Normally you will need two steps in doing this:

    (i) Prepare a word list.(ii) Build a base dictionary from the word list.

    The easiest way to prepare a word list is to use an alreadycompiled list of words. It should be not too difficult toobtain a public domain word list by anonymous FTP. The drawbackof this method is that such a list usually contains a lot ofmisspelled words.

    A harder method is to type each and every word appearing in awell-known dictionary yourself. Not recommended---very timeconsuming and unreliable (i.e., lots of typos).

    Here is a lazy way: first prepare a short list of veryfrequently used words. (In English, words such as "the", "of","to", "this", "that", "be", "is", "are", "go", "come" ... may be

    used.) You build a small base dictionary consisting of thesewords as explained in (Section III.3.1). Then you just dospell-checking using this tiny base dictionary, collecting newwords in your main user dictionary each time you use jspell.When the main user dictionary gets large, say > 500 words, thenmerge it to the base dictionary.

    Since an ordinary person uses less than 3,000 words excludingtechnical words in his/her specialization, your base dictionarywill soon get stabilized (i.e., no fuss of adding too many wordsin a single spell-check session). (The number of words in theKing James Version Bible is less than 13,000 despite the factthat it contains so many geographical and personal names.)

    If you are going to spell-check files that are prepared byyourself only, then this lazy method is not bad. You will havethe advantage of having a compact (and hence fast loading)dictionary. So this method is recommended for users of oldXT-computers.

    Another good method is to use other available spell checkers.You first grab tons of text files. (Well, 10 Meg should besufficient. Other than your own documents, Usenet is anexcellent source of such text files in your specializationfield.) Using the method in (Section III.3.1), you build a basedictionary, which is very likely to contain lots of misspelled

    words. Then get an ASCII text file, say consisting ofthe words in the base dictionary using the menu [BaseDic][Expand].(The reason why we are not using user dictionary instead isbecause of the limit of 5,000 words for user dictionaries.) Thenspell-check using your spell-checker---noninteractiveone is just fine. Be sure to use a reliable spell-checker---some of them contain too many misspelled words (UNIX "spell" isone such notorious example. "ispell" is better.) To increasethe reliability, use several different spell checkers. After youhave obtained a word list in this way, you can build the base

  • 7/29/2019 User's guide for JSPELL

    33/36

    dictionary with decent reliability.

    Don't be ambitious to build a large dictionary---because it willbe tedious, unimaginative, time consuming, and (most importantly)unnecessary.

    Appendix A. Networked mode

    Let's call the directory in which jspell.exe resides the "jspellexecutable directory", and denote it by DIR_EXE. jspell runs inthe networked mode if a file named "network" exists in thejspell executable directory DIR_EXE. Otherwise jspell runs inthe single user mode. The content of the file "network" does notmatter.

    In the networked mode, we use a directory called the "jspellconfiguration directory", which is denoted by DIR_CFG. Normally,this jspell configuration directory DIR_CFG is defined by theenvironment variable JSPELL_DIR. For instance, if you want thejspell configuration directory to be C:\MYDIC, then

    set JSPELL_DIR=C:\MYDIC

    command should be executed prior to jspell. (Normally, thisshould be done at booting time by autoexec.bat.) In case theenvironment variable JSPELL_DIR is not defined, then jspell usesthe root directory of the current drive as the default jspellconfiguration directory.

    jspell.cfg, jsptex.cfg and base.dic are first searched in thecurrent directory, and then in DIR_CFG. So each user can sethis/her own configuration by putting personal configurationfiles jspell.cfg and jsptex.cfg in the directory DIR_CFG. Ifjspell fails to find jspell.cfg, then it'll use the default filejspell.cfg in DIR_EXE. The same is true for jsptex.cfg andbase.dic.

    The main user dictionary is searched in the current directoryand then in DIR_CFG but NOT in DIR_EXE. It's o.k. not to havethe main user dictionary in which case it is simply treated asempty, and a fresh main user dictionary will be created inDIR_CFG if a word is put there during a jspell session.

    File specific user dictionary search rule is the same as that ofthe main user dictionary except that the fresh dictionary iscreated (if not already exist) in the current directory insteadof 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. Forinstance, the combination of the expanded memory manager"emm4j.sys" supplied in DOS4.0 and the popular disk-cache

  • 7/29/2019 User's guide for JSPELL

    34/36

    utility "superpck" will cause such a problem.

    Q2. What's the limitation of jspell?

    Ans. No limit on input file length. (Some limitation related to[Undo] may exist as explained at the end of (Section II.3.6).)Each line in the input file should have length

  • 7/29/2019 User's guide for JSPELL

    35/36

    *** Version 1.84-beta (Oct.11, 1993) ***

    Not released.

    o Global ignore is now done by Alt-G and/or [iGnore all]button. Similar changes to [rePlace all] and [marK all].

    o Digits at the left of suggested words are highlighted toindicate that they are command keys.

    o If a command key (like for [Ignore]) is pressedduring the dictionary look-up process for suggesting words,then the action is immediately taken (i.e., withoutcompleting the preparation of the suggested word list).

    o Laptop color option added. (B/W with no bright white)o Shift-Alt-A and Shift-Alt-T enter word to dictionary

    without asking capitalization. The same is true forShift-click.

    o Bug fix:(i) Math-ignore mode related bugs.(ii) If the input file size is in between 1025 bytes and

    2048 bytes, and if Alt-X is hit when more than 1024bytes are done, then the output file may be messed upat the tail part.

    (iii) dictman [UserDic][Read] menu couldn't handle some TeX

    constructions including the hyphenation command \-.(iv) If the input filename is user., then filedictionary get's the name user.dic}---thus filenamecollision.

    (v) dictman [UserDic][Read] menu hangs the computer ifapplied to large (> 1M bytes) files.

    *** Version 1.81beta (Oct. 1, 1993) ***

    Released only to a small number of beta testers.

    o Customizable list of TeX commands for ignoring the

    subsequent words.o Improved dictman in initial building up of basedictionaries. (The input word list file can contain morethan 5,000 words.)

    o Command line option of choosing base dictionary and/or filedictionary added.

    o The TeX hyphenation command \- is now considered as alegitimate subword.

    o The command key letters in the menu buttons are highlighted.o Combined the help files jspell.hlp and dictman.hlp.o Some more little improvements.o Bug fix:

    (i) Memory related bugs in multilevel undoing of (global)

    replacement actions.(ii) Erratic behavior in math ignore mode.(iii) NoBackUp option doesn't work as expected.

    *** Version 1.8beta (Sep. 19, 1993) ***

    Released only to a small number of beta testers.

    o Dictionary manager dictman.exe added.

  • 7/29/2019 User's guide for JSPELL

    36/36

    o File specific dictionary, multiple user dictionary support.o Accepts foreign characters by

    (i) extended ASCII code (e.g., 129 for umlaut u etc.), and/or(ii) TeX/LaTeX commands (e.g., \"u, \H{o}, \L, \ss etc.).

    o Much better interface w/ mouse support.o Multilevel undo up to 400 stepso Better TeX/LaTeX support including the math-ignore mode.o Better word suggestion scheme for capitalized words.o Deleted hundreds of misspelled words from base.dic.o Numerous little improvements.o Bug fix:

    (i) Occasional name switching of the input file. and the backup file .bak whenthe input file is large (e.g., above 300K bytes).

    *** Version 1.01 (Jun. 3, 1993) ***

    Fixed some bugs related to the installation. Made available byanonymous FTP at

    garbo.uwasa.fi:pc/spell/jspel101.zip, andSimtel (and its mirrors sites) msdos/tex/jspel101.zip

    *** Version 1.0 (May 29, 1993) ***First public release. Made available by anonymous FTP at

    garbo.uwasa.fi:pc/spell/jspell10.zip


Recommended