[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

RE: memory and pers.spl



> Jonathan Beard asked,
>
>
> So I installed Xy 4, and copied my pers.spl to it--and it can not
> load it, either.
>
> What is the best solution? Should I chop my pers.spl up into
> multiple dictionaries of what size, and ask startup.int to load them
> all--letting Xy manage the memory and swap them in and out?
>
>
> Response:
>
> In XyWrite III Plus it was approximately 50K, then in Signature (and
> XyWrite 4.0) the memory allocation for the personal dictionaries was
> decreased to about 10-12K. We therefore adopted a special XPL program
> and an associated application note for loading multiple personal
> dictionaries. In this way, user could break their larger personal
> dictionary down into multiple files, and then have the program load
> each dictionary sequentially during a spell process. It would load the
> first dictionary, conduct the spell, then load the next dictionary,
> etc., etc. The Application note and program are attached to this
> message. They can also be obtained from our WEB site WWW.TGRP.COM or
> our BBS 410 576-8806 (N,8,1)
>
>
> 
>
> Sincerely,
>
> George Buschman
> Technical Support
> 

Attachment: MULTISPL.PGM
Description: Binary data

®OS0¯®TP0LI,0LI¯®OF10DI,10DI¯®BT5LI,0LI,5LI,7LI¯®BOLB=APP,WT=1PT,1PT,2PT,2PT,IN=0DI,0DI,0DI,0DI,RS=100,IS=0,AB=0,,0¯®AL1¯®BOLB=SN,WT=1PT,IN=0DI,0DI,0DI,0DI,RS=100,IS=0,AB=1,,1¯®BL1¯®UBAPP¯®GU2DI,1.DI¯®ET+1LI¯®EE+1LI¯®SN0DI,32.5DI¯®UFBASKERVILLE¯®SZ10PT¯®SY23Z,0,0,1¯®RHO®MDNM¯®FR¯APPLICATION NOTE #188
®FC¯®SZ14PT¯WORKING WITH MULTIPLE PERSONAL DICTIONARIES IN XYWRITE III PLUS AND
SIGNATURE
®LDþ
¯

¯®RHE®MDNM¯®FL¯APPLICATION NOTE #188
®FC¯®SZ14PT¯WORKING WITH MULTIPLE PERSONAL DICTIONARIES IN XYWRITE III PLUS AND
SIGNATURE
¯®RFA®MDNM¯Page ®PN¯ of ®FP¯®LD
¯®UFFUTURACONDENSED_M¯®SZ9PT¯®SY23Z,0,0,2¯THE®MDBO¯TECHNOLOGY®MDNM¯GROUP¯®JU¯You
may customize the spelling checker in XyWrite or Signature by creating one or more personal
dictionaries--i.e., lists of unusual or specialized words which you use often and which you would
like the spelling checker to skip over. You may have any number of these ``personal'' spelling
dictionaries. However, there is a limit (imposed by memory considerations) on the total number of
words that can be used at any one time. This application note describes MULTISPL.PGM, a program
which can circumvent that limitation in XyWrite III Plus or Signature.

MEMORY AND PERSONAL SPELLING DICTIONARIES
In XyWrite III Plus, all personal spelling dictionaries are loaded into one 64K memory buffer (which
is part of RAM). This 64K can be used by one large dictionary, or by a number of smaller ones.

In Signature, a personal spelling dictionary is limited to approximately 14K of memory, which is
broken down into 27 blocks with 512 bytes in each block. Signature's spelling checker places words
into blocks according to the following common characteristics: (a) they share the same first letter;
(b) they include a number or numbersÄi.e., 2nd; or (c) the first character is a punctuation
mark. A new memory block is also opened for words that do not fit into any of the other categories,
or when a block is filled to capacity.

Note #1 Overhead Memory Space. In both XyWrite and Signature, the size of a file is not always a
clear indication of how much memory it will use. Each word in the file uses one byte for each
letter, plus six bytes for program ``overhead.'' For instance, a 5-letter word accounts for 11 bytes
of memory.

Because of the memory limitations imposed on personal dictionaries by both XyWrite III Plus and
Signature, you may be unable to load all the dictionaries you need into memory at the same time. As
a simple example, say you have three personal dictionaries (named PERS1.SPL, PERS2.SPL, and
PERS3.SPL) which contain the words ``Poughkeepsie,'' ``Taunton,'' and ``Hoboken'' respectively.
Let's also say that combined, these three dictionaries exceed the memory allocation of XyWrite III
Plus or Signature. Say you have a file that happens to contain the words ``Poughkeepsie,''
``Taunton,'' and ``Hoboken.'' If you load only PERS1.SPL into memory, the SPELL command will flag
``Taunton'' and ``Hoboken'' as questionable. If you load PERS1.SPL and PERS2.SPL into memory, it
will still flag ``Hoboken.'' Using the standard

XyWrite III Plus and Signature spelling procedures, there is no way to load all three dictionaries
into memory at once and thus bypass all three words.


GETTING AROUND THIS LIMITATION
When you use the SPELL command in XyWrite or Signature to check the spelling of a stored file, a
separate file is created which contains a list of questionable words. These words are not included
in any of the spelling dictionaries which are in memory. Once the spelling checker has generated a
list of questionable words, you can edit that list and run the CORRECT command, which will use the
list to correct the original document. (For more information, see the description of the CORRECT
command in Chapter 3 of the XyWrite III Plus Reference Guide. The ``File Correct'' section of the
Signature Command Reference Guide explains how to use the CORRECT command in Signature.)
MULTISPL.PGM takes advantage of the two-step SPELL/CORRECT process. It intervenes between the two
steps to load different personal spelling dictionaries, and spell checks the list of exception words
itself. Thus, with every additional spelling dictionary loaded, the list of exception words gets
smaller.

In our example, MULTISPL.PGM would load PERS1.SPL and then run SPELL on the original file. The
exception list contains both ``Taunton'' and ``Hoboken.'' The program then loads PERS2.SPL and spell
checks the exception list, not the original file. This creates a new exception list, which contains
the word ``Hoboken.'' Now PERS3.SPL is loaded, and the new exception list is checked. ``Hoboken'' is
recognized as correct, and the final exception list does not contain any of the three city names.

USING MULTISPL.PGM IN AUTOMATIC MODE
You can use any number of personal spelling dictionaries, but for MULTISPL.PGM to work
automatically, they must be named PERS1.SPL, PERS2.SPL, PERS3.SPL, etc. There can be no gaps in the
numbering. All dictionaries must reside in a subdirectory or floppy disk which XyWrite/Signature
can find via the DOS path statement. To run the program:

1. Display the file you want to spell check.

2. Type: F5run multispl.pgm

Result: XyWrite/Signature stores the file, checks the spelling against all the PERSn.SPL
dictionaries, and creates a list of questionable words that it stores in a file called SPELL1.TMP.
It then starts the CORRECT process on the original file.

MULTISPL.PGM can be loaded onto a Save/Get (i.e., macro) key either from the command line or from
your startup file. From the command line:

  Type: F5ldpm multispl.pgm,n

(where n represents the Save/Get--i.e., macro--key you have chosen to activate the program.)


USING MULTISPL.PGM IN CUSTOM MODE
If you want to use a set of personal spelling dictionaries that do not adhere to the strict naming
convention outlined above, you can run the program in ``custom mode.''

To use custom mode, list all the personal spelling dictionaries you want the program to use in a
separate file named MULTISPL.LST. The file must have this name and it must be in the same
subdirectory as the text file you wish to spell check. In this master file, list one dictionary name
on each line. For example:

  corporate.spl
  branch.spl
  department.spl

As in automatic mode, all dictionaries must reside in a subdirectory or on a floppy disk which
XyWrite/Signature can find via the DOS path statement. To run the program, perform steps 1 and 2 of
the procedure for using MULTISPL.PGM in automatic mode.

Note #2 Sequence. Unlike automatic mode, custom mode allows you to use dictionaries out of
sequence, such as:

  pers1.spl
  pers3.spl
  pers4.spl


SPELL CHECKING GROUPS OF FILES
To use MULTISPL.PGM on a group of files, you must create a parent file that contains the names of
each file in the group. This parent file must be called MULTISPL.PAR, and it must be located in the
same directory as the text files. List one file per line, as shown below (you can include path names
if necessary):

 chapter1
 chapter2
 chapter3

When checking a group of files, start the program without a file in the current window. Then issue
the command to start MULTISPL.PGM:

  Type: F5run multispl.pgm

MULTISPL.PGM will search for any open files. When it does not find any, it will automatically spell
check MULTISPL.PAR.

Note #3 Custom Mode. You can also use ``custom mode'' on a group of files by performing the
following steps:

 1. Create your MULTISPL.LST and MULTISPL.PAR files.

 2. With no files open:

   Type: F5run multispl.pgm