Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Nov 2008 07:58:36 +0200
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Eitan Adler <eitanadlerlist@gmail.com>
Cc:        freebsd-doc@freebsd.org, freebsd-questions@freebsd.org
Subject:   Re: spell check - how to?
Message-ID:  <87d4h884c3.fsf@kobe.laptop>
In-Reply-To: <4913C74C.80606@gmail.com> (Eitan Adler's message of "Thu, 06 Nov 2008 23:42:52 -0500")
References:  <4913C74C.80606@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 06 Nov 2008 23:42:52 -0500, Eitan Adler <eitanadlerlist@gmail.com> wrote:
> [cc to -questions as it might be a general question]

Hi Eitan :-)

> I'm looking to do a full spell check/fix on the handbook.  I found
> "make spellcheck-txt" which apparently removed certain items that
> would not go well through a spell checker - however I don't know how
> to actually run the spellcheck itself.
>
> I have aspell installed.

You will probably have to tweak the ISPELLOPTS to use aspell.  The
current spellcheck targets use a default ISPELLOPTS with a value of:

%%%
doc/el/share/mk/doc.project.mk:ISPELL?=     ispell
doc/el/share/mk/doc.project.mk:ISPELLOPTS?= -l -p /usr/share/dict/freebsd ${ISPELLFLAGS}
%%%

The -l option is not supported by aspell, so the following spellcheck
run fails:

: % pwd
: /ws/doc/en_US.ISO8859-1/articles/contributing
: % env ISPELL=aspell make FORMATS=txt spellcheck
: Spellcheck article.txt
: Error: You must specify a parameter for "-l".
: *** Error code 1
:

But you can set ISPELL and ISPELLOPTS in the runtime environment to pass
aspell-compatible options:

: % env ISPELL=aspell ISPELLOPTS='list' make FORMATS=txt spellcheck
: Spellcheck article.txt
: jcamou
: IEEE
: ...

Unfortunately, the wordlist at `/usr/share/dict/freebsd' is not usable
with aspell right now, so if you try to use it you will get errors like:

: env ISPELL=aspell \
:     ISPELLOPTS='-p /usr/share/dict/freebsd ${ISPELLFLAGS}' \
:     ISPELLFLAGS='list' make FORMATS=txt spellcheck
: Spellcheck article.txt
: Error: The file "/usr/share/dict/freebsd" is not in the proper format.
: *** Error code 1

The main drawback of being unable to use the `freebsd' wordlist is that
you will get many false positives for words that are perfectly valid for
FreeBSD documentation but are not standard English words.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87d4h884c3.fsf>