[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Aspell-user] looking for command line syntax to check correct spell
From: |
Patrick Krug |
Subject: |
Re: [Aspell-user] looking for command line syntax to check correct spelling of word or words |
Date: |
Tue, 15 Feb 2005 15:46:31 -0500 |
This would be fine but what I am trying to do is restrict the words that it
displays to a small number of words.
I have a website that that I have indexed. I will grab the words that have
been indexed and use those words to suggest a word similiar to the word that
they entered.
What I have a problem with is the syntax creating my personal word list and
then using that list to suggest the correct spelling.
I have the correct syntax to check the spelling against the current
dictionary but not a list that I want to correct.
Thanks once again.
----Original Message Follows----
From: Keith Christian <address@hidden>
To: Patrick Krug <address@hidden>
Subject: Re: [Aspell-user] looking for command line syntax to check correct
spelling of word or words
Date: Mon, 7 Feb 2005 10:32:12 -0800 (PST)
Hi Patrick,
I'm using aspell as installed under Cygwin (www.cygwin.com) and it works
well
for me. I have a shell script that tests a word or words for spelling under
Aspell and also gets a definition if available from WordNet (also part of my
Cygwin install.)
The easist way I've found is to echo / pipe the word to Aspell. Here is a
sample command line by Aspell when passed in the incorrectly spelled
"synoym"
instead of "synonym," the correct spelling:
echo "synoym" | aspell -a
Mon Feb 07 11:26:54 ~/>spell synoym
@(#) International Ispell Version 3.1.20 (but really Aspell 0.50.3)
& synoym 16 0: synonym, synonymy, Sonoma, synod, Symon, Sony, synonyms,
snowy, snot, syn, Sonya, Sunny, sunny, Storm, snout, storm
Here is a function I used in the BASH shell under Cygwin to send words to
both
Aspell and WordNet on my local machine:
TIMESTAMP=$(date '+%Y%m%d_%H%M%S')
PROGRAM_NAME=$0
SEPARATOR="--------------------------------------------------------------------------------"
function1() {
:
for THEWORD in "$@"
do
echo "${TIMESTAMP}-----aspell-----${SEPARATOR}"
echo "${THEWORD}" | aspell -a
echo "${TIMESTAMP}-----wordnet-----${SEPARATOR}"
wn "${THEWORD}" -over
done
echo "${TIMESTAMP}-----done-----${SEPARATOR}"
}
====Keith
--- Patrick Krug <address@hidden> wrote:
> I was told that I could use aspell to get a list of words similiar or the
> correct spelling, ie "did you mean?"
>
> I would like to pass in a word or words that a user has entered. Pass in
a
> file of words that it should use to find words that are possibly the
correct
>
> spelling of the word entered.
>
> I would like to output the information to a file or stdout and then parse
> the words.
>
> I was told that the aspell program would do this but I can not find the
> syntax or commands to create a personal word list to limit the words
> returned so that I can display "did you mean?".
>
> Thanks in advance.
>
> The current syntax I have tried is as follows:
>
>
> c:>aspell --lang=en_US create personal personal_test <mywordlist
> c:>aspell --lang=en_US --encoding=utf-8 -p=personal_test -a <c:\pepe.txt
>
> (i have tested the second command without personal (-p) and it has worked
> fine. I can not test with a personal list since I have not been able to
> create it)
>
> I am using version 0.50.3 alpha on windows.
>
> when I try the syntax to create my personal word list the program exits
> with "abnormal program termination"
>
> I have read various articles about the personal word list and I am not
sure
> what syntax it should be in. I have tried just creating it with a header
> and starting the words with '*' and ending the file with # and three
empty
> lines.
>
> Thanks in advance.
>
>
>
>
> _______________________________________________
> Aspell-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/aspell-user
>