Bug#869733: ispell.1X: Fix some formatting and textual matters
Yes, K doesn't automatically mean bytes. When somebody makes $100K per year, they're not earning their pay in bytes. In any case, that line in ispell.1X is horribly obsolete. I just did a quick test of the largest word list I have; it did 80K roots in 1.7 seconds on my laptop. I'm going to remove the line; I didn't realize it was still there. Bjarni Ingi Gislason writes: Hi, Package: ispell Version: 3.4.00-6 Severity: minor The patch is in the attachment. Sorry for the delay, Thanks for the patch, I've just applied it in git, see [1]. As your patch was apparently for the older version of ispell (3.3.02), some of your corrections were already there. Additionally I've changed your fix for: "-munching a normal-sized dictionary (15K roots, 45K expanded words)" from: "+munching a normal-sized dictionary (15\ kB roots, 45\ kB expanded words)" to: "+munching a normal-sized dictionary (15000 roots, 45000 expanded words)" as K meaning just "kilo", i.e. "thousand", here seemed more sensible to me. [1] https://salsa.debian.org/debian/ispell/blob/7416a731b3efb8586bca56099194e2fc66996399/debian/patches/0039-Man-page-issues-fix.patch Regards, robert -- Geoff Kuenning ge...@cs.hmc.edu http://www.cs.hmc.edu/~geoff/ It's is not, it isn't ain't, and it's it's, not its, if you mean it is. If you don't, it's its. Then too, it's hers. It isn't her's. It isn't our's either. It's ours, and likewise yours and theirs. -- Oxford University Press, Edpress News
Bug#305750: ispell reorders words in personal dictionary without good reason
ispell reorders the words in your personal dictionary without good reason when you have words which only differ in their capitalization. This is easily fixed, and will be corrected in the next version. The patch to tree.c to make the sort stable is: Index: tree.c /home/geoff/src/local/ispell === RCS file: RCS/tree.c,v retrieving revision 1.66 diff -u -r1.66 tree.c --- tree.c 2005/04/14 14:43:46 1.66 +++ tree.c 2005/11/03 19:39:17 @@ -527,13 +527,12 @@ struct dent ** enta; struct dent ** entb; { +intcmpresult; -/* The parentheses around *enta and *entb below are NECESSARY! -** Otherwise the compiler reads it as *(enta-word), or -** enta-word[0], which is illegal (but pcc takes it and -** produces wrong code). -**/ -return casecmp ((*enta)-word, (*entb)-word, 1); +cmpresult = casecmp ((*enta)-word, (*entb)-word, 1); +if (cmpresult == 0) + cmpresult = strcmp ((char *)(*enta)-word, (char *)(*entb)-word); +return cmpresult; } #endif -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ Windows XP is the most reliable Windows ever, which is like saying that asparagus is the most articulate vegetable ever. -- Dave Barry -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#305750: ispell reorders words in personal dictionary without good reason
I neglected to mention that the patch I sent hasn't yet been tested, although I believe it to be correct. -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ Windows XP is the most reliable Windows ever, which is like saying that asparagus is the most articulate vegetable ever. -- Dave Barry -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#305750: ispell reorders words in personal dictionary without good reason
Aargh. The previously sent patch is completely ineffective; it's addressing the problem at a place different from where the bug arises. A correct fix is somewhat trickier, but I'm working on it... -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ Statistics don't bore people, people bore people. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#305750: ispell reorders words in personal dictionary without good reason
Here's a revised patch. Although the previous patch is harmless, it turns out to address the problem at the wrong level. The correct approach is to build the internal data structure with variant spellings stored in the same order as they appear in the personal dictionary. Fortunately, this is easy, though the patch is to a different file. This one has been tested. (That's what I get for trying to rush out a fix before a meeting!) Index: makedent.c RCS file: RCS/makedent.c,v retrieving revision 1.59 diff -u -r1.59 makedent.c --- makedent.c 2005/04/20 23:16:32 1.59 +++ makedent.c 2005/11/03 22:11:35 @@ -447,9 +447,10 @@ if (retval == 0) { /* - ** Couldn't combine the two entries. Add a new variant. For - ** ease, we'll stick it right behind the header, rather than - ** at the end of the list. + ** Couldn't combine the two entries. Add a new variant. We + ** stick it at the end of the variant list because it's + ** important to maintain order; this causes the personal + ** dictionary to have a stable ordering. */ forcevheader (hdrp, oldp, newp); tdent = (struct dent *) mymalloc (sizeof (struct dent)); @@ -460,10 +461,13 @@ return -1; } *tdent = *newp; - tdent-next = hdrp-next; - hdrp-next = tdent; - tdent-flagfield |= (hdrp-flagfield MOREVARIANTS); - hdrp-flagfield |= MOREVARIANTS; + for (oldp = hdrp; + oldp-next != NULLoldp-flagfield MOREVARIANTS; + oldp = oldp-next) + ; + tdent-next = oldp-next; + oldp-next = tdent; + oldp-flagfield |= MOREVARIANTS; combineaffixes (hdrp, newp); hdrp-flagfield |= (newp-flagfield KEEP); if (captype (newp-flagfield) == FOLLOWCASE) -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ The P in PDF is a lie. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#318917: dictionaries-common: [ispell.el]: Does not allow to safe word if it thinks is is a new composition
Use option 'i' if the word is valid (even if affix rules composition not). I would suggest: Use option 'i' if this is a correctly spellled word. and leave the issue of affix composition out of the message. Incidentally, the affix rules have nothing to do with roots and derivatives; they are merely lexical rules. Ispell cares only about strings of letters, not how the language uses the words. Thus, it suggests Schaf+t because it knows that you can add t to some words to get another valid word. Similarly, with a small English dictionary, ispell will suggest that mother is the comparative form of moth. -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ Software, like bridges, should be elegant and visually pleasing as well as functional. Ugly constructs, designs, and languages should be avoided like the plague. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#310844: Fails with strings starting by \sp (e.g., \spanish, \special)
I have noticed a strange ispell behavior when strings starting by \sp are in the text, like in \spanish or \special, $ cat test.txt \special \spanish This is a feature, not a bug. By default, ispell uses the nroff deformatter. \sp is a control sequence in nroff. (More accurately, \sn where n is a number, is a control sequence, but ispell's deformatter is a bit dumb about it.) You'll find similar problems with \f and \(. If you want plain-text deformatting, ispell 3.3 offers the -o option to do that. -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ One could not be a successful scientist without realizing that, in contrast to the popular conception supported by newspapers and mothers of scientists, a goodly number of scientists are not only narrow-minded and dull, but also just stupid. -- James Watson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#130397: Bug 130397
This approach is quite promising, but it doesn't work sufficiently well for non-English languages. It loses all characters that don't belong to the alphabet specified in .aff file. For example, it turns the line: For related reasons, the english.aff file in the next ispell release will include a much expanded character set. That allows words adopted from other languages (such as naïve) to be included in the dictionary. If every language did the same, part of the problem would go away. But there is another problem. fixispell-a returns a list of near misses only for the last language in the pipe. It would be better if it accumulated a list of near misses from all ispell commands in the pipe. Yeah, I just realized that drawback. I think I can come up with a way to fix it, though the invocation mechanism would be different. The revision would be a command called something like multispell, invoked like this: multispell [ispell-switches] -d language-1 -d language-2 and behaving like ispell -a. For convenience, it could also automatically supply a catch-all -w switch. -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ Statistics don't bore people, people bore people.
Bug#130397: Bug 130397
I agree that marking would help ispell.el to decide which dictionary to use on a word. However, even without marking users might still prefer to check words simultaneously with multiple dictionaries That's a good point. Unfortunately, the current implementation of ispell makes it impossible to use two dictionaries simultaneously. I do recall hearing from one user who used a pipe something like this: ispell -d language-1 -l | ispell -d language-2 -l ... | sort -uf but of course that only provides a list of misspelled words, and loses all the correction capabilities. Just brainstorming, it probably wouldn't be too hard to write a postprocessing script for -a mode that turned the output of ispell -a into something suitable for another ispell. The idea would be that you feed: I do not want to acept my bda lueck and turn the output lines: @(#) International Ispell Version 3.2.06 08/01/01 * * * * * acept 2 17: accept, adept * bda 9 26: Ada, baa, bad, bea, bida, boa, bra, FDA, Ida lueck 1 30: luck into a line of blanks and misspelled words: aceptbda lueck which can then be fed into another ispell -a instance. The final output would be returned to emacs. The pipe would look like: ispell -a -d language-1 | fixispell-a | ispell -a -d language-2 In fact, this script is so easy I think I'll whip it up right now. It's called fixispell-a, and it will be in the next ispell release. Here it is: #!/bin/sh # # $Id: fixispell-a,v 1.1 2005/01/18 13:48:52 geoff Exp geoff $ # # Copyright 2005, Geoff Kuenning, Claremont, CA. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright #notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright #notice, this list of conditions and the following disclaimer in the #documentation and/or other materials provided with the distribution. # 3. All modifications to the source code must be clearly marked as #such. Binary redistributions based on modified source code #must be clearly marked as modified versions in the documentation #and/or other materials provided with the distribution. # 4. The code that causes the 'ispell -v' command to display a prominent #link to the official ispell Web site may not be removed. # 5. The name of Geoff Kuenning may not be used to endorse or promote #products derived from this software without specific prior #written permission. # # THIS SOFTWARE IS PROVIDED BY GEOFF KUENNING AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL GEOFF KUENNING OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # Take the output of ispell -a and turn it into a line that can be # fed into another ispell -a instance. # # Usage: # USAGE='Usage: ispell -a ispell-switches | fixispell-a | ispell -a ...' # # BUGS: # # This script is probably not portable to older systems. # # $Log: fixispell-a,v $ # Revision 1.1 2005/01/18 13:48:52 geoff # Initial revision # case $# in 0) ;; *) echo $USAGE 12 exit 2 ;; esac awk 'NR == 1 \ { next } NF == 0 \ { print line line = next } $1 == * || $1 == + || $1 == - \ { next } $1 == || $1 == ? || $1 == # \ { if ($1 == #) offset = $3 + 0 else offset = substr($4, 1, length($4) - 1) + 0 if (length(line) offset) line = sprintf(%s%*s, line, offset - length(line), ) line = line $2 next } { print fixispell-a: unrecognized ispell input line $0 /dev/stderr exit(2) }' -- Geoff Kuenning [EMAIL PROTECTED] http://www.cs.hmc.edu/~geoff/ If a person is obviously mentally disabled, such as having Down's syndrome or Alzheimer's, decent people exercise sympathy and understanding in their interactions. So why, if someone merely has a low IQ, is he treated with ridicule and contempt? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject