home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d191 / ispell.lha / ISpell / update < prev    next >
Text File  |  1989-03-14  |  5KB  |  104 lines

  1.         Ispell enhancements - 3/13/87
  2.  
  3. (See three companion postings in net.sources.bugs).
  4.  
  5. Here are the enhancements to ispell that I mentioned a couple of days ago.
  6. Because of the number of changes, several of the context diff's are bigger
  7. than the original files.  In addition, many people have gotten confused
  8. about versions, since enhancements/fixes have been made by six different
  9. people, counting myself (for the list, see the end of ispell.man).  I
  10. have integrated all of these fixes and enhancements in one place.
  11.  
  12. For these reasons, I have decided to repost all of the sources for ispell,
  13. with one exception -- the dictionary.  (A couple of small files, such
  14. as ispell.el, are unchanged, but I decided to repost them any for
  15. completeness.  If you didn't have ispell before, you now need only the
  16. dictionary).
  17.  
  18. The dictionary is a special case:  if you think about it, even ordinary
  19. diff's will always work with "patch" on that each-line-is-unique file.
  20. An out-of-place insertion can be corrected by sorting the dictionary
  21. after patching (something that is done anyway as a side effect of the
  22. new "munchlist" script).  Because of this, I have decided not to repost
  23. the sizable dictionary.  In the process of testing this code, it occurred
  24. to me to run dict.191 through UNIX "spell";  the results of that are
  25. given in three companion postings in net.sources.bugs, which seemed
  26. like a more appropriate place for the diffs.  (The postings are not
  27. divided because of their size;  see comments in the postings for my
  28. reasons).
  29.  
  30. Now, here's what I've done:
  31.  
  32. In ispell itself:
  33.  
  34.     - The personal dictionary is now hashed, just like the main one, and
  35.       supports suffixes just like the main one.  (It's not actually
  36.       integrated with the main one, because expanding the main one
  37.       is inefficient and poses a minor but troublesome technical
  38.       problem).  A personal dictionary of 28000+ words can be read in
  39.       within a few minutes (hey, nobody's perfect -- whatcha doing
  40.       with such a big dictionary anyway? :-).
  41.     - New option "-c" is used by the new munchlist script to generate
  42.       suggested root/suffix combinations.
  43.     - The -d option can now specify /dev/null, if you want to use
  44.       only your personal dictionary (this also saves startup time
  45.       with -c, and is used by the "munchlist" script, which is why
  46.       I put it in).
  47.     - The -p option is now more flexible about its handling of pathnames.
  48.       An absolute pathname is always interpreted literally.  A
  49.       relative pathname from WORDLIST is looked up in $HOME first,
  50.       then in the current directory.  The -p option behaves in the
  51.       reverse fashion:  current directory first, then $HOME.  This
  52.       behavior seems more intuitive to me;  I'd be interested in
  53.       opinions of others if you don't find it intuitive.
  54.     - Perhaps most important, I have completely overhauled the logic
  55.       in good.c, so that it (I think) matches what the README file
  56.       says it should, no more, no less.  The code has been extensively
  57.       tested, notably by interaction with the new expansion scripts;
  58.       nevertheless because of the extent of the changes and the
  59.       nature of the logic, I'd suggest a bit of suspicion for a while.
  60.       A technique we've found useful here is to do your normal work
  61.       with ispell, and then do a final check with UNIX spell or some
  62.       other slow, inconvenient program to make sure ispell didn't
  63.       screw up.
  64.  
  65. New scripts:
  66.  
  67.     - expand.awk:  an obsolete (but correct) awk script that does
  68.       the same thing as expand[12].sed, except slower.  The awk
  69.       script is also much easier to understand than the sed scripts.
  70.       Superseded by the sed scripts, except for very short input.
  71.     - expand[12].sed:  the sed pipe
  72.  
  73.         "sed -f expand1.sed $file | sed -f expand2.sed"
  74.  
  75.       where "$file" is a raw dictionary file with suffixes
  76.       (e.g., dict.191), generates a list of each root alone, plus
  77.       the root expanded with each possible suffix (e.g.,
  78.       "BOTH/R/Z" produces "BOTH", "BOTHER", and "BOTHERS").  The
  79.       output should usually be sorted with the -u switch before
  80.       further processing.  These scripts are used by 'munchlist';
  81.       they are also useful for (a) checking an ispell dictionary
  82.       with some other spell-checking program and (b) figuring
  83.       out what a particular suffix does to a certain word without
  84.       reading the README file.
  85.     - munchlist.sh:  a slow, but effective, shell script that takes
  86.       lists of expanded or unexpanded words as input and reduces
  87.       them to a (usually smaller) list of roots and suffixes.  The
  88.       result is written to standard output.  I think the documentation
  89.       forgot to mention the input must be one word per line.  I
  90.       have successfully used this script to combine dict.191 with
  91.       /usr/dict/words;  it's also useful (and a lot faster) on
  92.       private dictionaries.  For private dictionaries. it will also
  93.       remove any word that has since been added to the main dictionary.
  94.  
  95. Oh yes, I almost forgot:  the original documentation didn't mention
  96. that ispell is a long-name program.  If your "File:" display on the
  97. top line actually contains the misspelled word, you have long-name problems.
  98. My fixes don't address long names, because I finally have a way to
  99. compile long-name programs, thanks to "hash8".
  100.  
  101.     Geoff Kuenning
  102.     geoff@ITcorp.COM
  103.     ...!trwrb!desint!geoff
  104.