Re: [PATCH] kernel source spellchecker

jw schultz (jw@pegasys.ws)
Sun, 2 Mar 2003 00:40:48 -0800


On Sun, Mar 02, 2003 at 12:21:47AM -0800, Dan Kegel wrote:
> jw schultz <jw () pegasys ! ws> wrote:
>
> >An ispell filter seems a simpler approach to me. (ispell -F
> >filter) I use that (shown here to head off requests) for
> >email so quoted content is ignored. A similar filter for C
> >source would make this trivial.
> >
> >$ grep ispell .muttrc
> >set ispell="ispell -F maildequote"
> >$ cat bin/maildequote
> >#!/usr/bin/perl
> >
> >while (<STDIN>)
> >{
> > /^[>|] / || /^On .* wrote:$/ and tr[A-Za-z][_];
> > print $_;
> >}
> >print "\004";
>
> Integrating in to existing spellcheckers is a Good Idea,
> though it might not totally replace the perl script Matthias
> wrote (does ispell have a batch mode that works on whole
> directory trees?).
>
> BTW, ispell on my system is gnu aspell,
> and I couldn't tell for the life of me from the manual
> whether it supports this kind of filter.
> Nor could I find any doc on ispell filters.
> Where's the best place to learn about 'em?

The manpage was my only reference. It was enough:

The -F switch specifies an external deformatter program.
This program should read data from its standard input and
write to its standard output. The program must produce
exactly one character of output for each character of
input, or ispell will lose synchronization and corrupt the
output file. Whitespace characters (especially blanks,
tabs, and newlines) and characters that should be spell-
checked should be passed through unchanged. Characters
that should not be spell-checked should be converted into
blanks or other non-word characters. For example, an HTML
deformatter might turn all HTML tags into blanks, and also
blank out all text delimited by tags such as "code" or
"kbd".

I don't know if aspell has filter support. I'm running
International Ispell Version 3.2.06 08/01/01
It came standard on SuSE.
http://fmg-www.cs.ucla.edu/geoff/ispell.html
It isn't GPL but the license terms are not unacceptable.

-- 
________________________________________________________________
	J.W. Schultz            Pegasystems Technologies
	email address:		jw@pegasys.ws

Remember Cernan and Schmitt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/