aspell-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Aspell-user] aspell replacement word list


From: Gary Setter
Subject: Re: [Aspell-user] aspell replacement word list
Date: Sun, 19 Feb 2006 09:11:30 -0600

----- Original Message ----- 
From: "Sean Byrne" <address@hidden>
To: <address@hidden>
Sent: Saturday, February 18, 2006 3:22 PM
Subject: [Aspell-user] aspell replacement word list


I have a question about the distinction between "replacement
wordlists"
and "dictionaries".

I am using aspell 0.50.3 (windows port). I also use the one that
came
with cygwin (also 0.50.3)



I created a dictionary file to test auto-replacing acronyms and
abbreviations with expanded words. The "no spaces in words"
restriction
is limiting, but I have a more fundamental problem.



If I create a text file like this, called
"spb_replacements.list":



pt patient

ER EmergencyRoom



Then generate a dictionary file for use with aspell:

aspell create master --lang=en ./spb_replacements.dict <
spb_replacements.list



I try out a "test.txt" file with the following sentence:

The pt was seen in the ER



This command:

aspell -d ./spb_replacements.dict -c test.txt



runs aspell, which only complains about words other that "pt" and
"ER",
which I ignore, but the corrected file doesn't contain replaced
terms
for "pt" or "ER" (I was expecting to see this output: "The
patient was
seen in the EmergencyRoom")



if I try another approach using the original replacement list
file

aspell -c test.txt  --repl=spb_replacements.list

I get:

Error: The file "spb_replacements.list" is not in the proper
format.

(also fails with "spb_replacements.dict")



Can ASPELL  actually replace words listed in a "replacement
wordlist"
file?

How? Is there an aspell version-dependency I am missing? What is
the
proper format for this file?



I am also interested to know your advice for using aspell in a
java
environment. Do you recommend SWIG or some other process or
utility?

>
----- Reply -----
Conserning the replacement dictionary. There are many types of
dictionaries supported by aspell.
Multi dictionaries - Usually the main dictionary, one one pointed
to be the configuration key master.
Master dictionaries - The list of standard word, this is compiled
with the "create master" command.
Personal dictionary - This the list of words you add with the
"add" command while spell checking
Replacement dictionary - The word pairs you add with the "replace
all" command while spell checking.
The file name of the replacement dictionary is specified the
configuration file with the "repl" key.
The replacement dictionary is not compiled. Take a look at it and
you can see that it is an ordinary text file that start with a
particular header, like this
personal_repl-1.1 en 0
I would suggest you take another look at the manual and make sure
you understand how Aspell uses dictionaries.
How do you get your expansions into the replacement dictionary. I
would suggest that you just append them to your replacement file,
since they are plain test files.
Replacement dictionaries are not designed for auto replacement.
They are designed for making good suggestions when spell checking
a document. If you just want to make replacements, maybe you need
another program?

Sorry I don't know about Java bindings. But maybe someone else
here does.

You are also welcome to check out my project which includes ports
of Aspell 0.60.6 and the current CVS version as subprojects. You
can find it here:
http://sourceforge.net/projects/descdatadiary
My project is in Alpha status. Your comments are welcome.

Best regards,
Gary Setter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]