tcianflo@nugipsy.UUCP (06/03/87)
We would like to get spell to look at an auxiliary word list which would contain entries unique to our site and company. Reading the man page, it looks like this is possible, but darned if I can figure out how. Thanks in advance for any help you can give me. (PS. One UN*X manual said that some versions support the '+mylist' option for this. Ours doesn't.) -- => Regards, Tom Cianflone @ Gould Computer Systems Division <= => ...!{seismo,sun,pur-ee,brl-smoke}!gould!tcianflone <= => ...!ihnp4!{codas,allegra}!novavax!gould!tcianflone <= => NOTE: Disregard header info. Email to above paths only. <=
jeff@cjsa.UUCP (C. Jeffery Small) (06/05/87)
In article <373@nugipsy.UUCP>, tcianflo@nugipsy.UUCP (Tom Cianflone) writes: > We would like to get spell to look at an auxiliary word > list which would contain entries unique to our site and > company. Reading the man page, it looks like this is > possible, but darned if I can figure out how. > I am not sure if this addresses your problem but ... on our machine, when we specified an auxiliary local word list, the list would be accepted on the command line with the +local_files option, yet it would only weed out included words on a partial basis. (ie. some words in the list would be caught while others would be passed on.) This is the solution I found to the problem. Take a look at your spell script (/usr/bin/spell on our machine). You should be able to tell if this script supports the "local_file" option or not. Assuming that it does, near the end you will find a long pipeline of commands which produces the final list of misspelled words. In our script, this pipeline started off by producing a sorted list of words in your file with upper and lower case distinction folded (sort -f). Near the end of the pipeline, "comm -23" is used to compare the remaining words with your local_file. THE PROBLEM: "comm" expects and MUST HAVE files sorted in straight ASCII order (ie. "sort" not "sort -f") in order to work properly. It does no good to "sort -f" your local_file. To fix the problem, insert a "| sort |" into the pipeline immediately before the "comm -23" command. It works for us - just be sure to always keep your local_file "sort"ed properly. An example would make this all crystal clear but I am not including any contents from "spell" so as to avoid copyright problems. I hope this is helpful to someone. (PS. the broken spell script was on my unix-pc (3B1). For those of you with similar machines, check your scripts!) BONUS: In vi, add the following map to your .exrc file to perform spelling checks on the file you are editing - without exiting the editor. map ^V{KEY} :%w !/usr/bin/spell +/usr/lib/spell/LOCALWORDS ^V| more^M ^ +---- Your specially assigned key Now, just hit {KEY} within vi to generate a list of misspelled words which won't go scrolling off the screen. Hey, ispell it's not :-) --- Jeffery Small (203) 776-2000 UUCP: ihnp4!---\ C. Jeffery Small and Associates hsi!cjsa!jeff 123 York Street, New Haven, CT 06511 hao!noao!---/