Reputation: 415
I have installed Aspell dictionary to spell check my document. But in the document there are some words which are spelled incorrectly but I do not want aspell to detect those as incorrect. So, basically I want to add those words to the existing aspell dictionary.
I am trying to follow instructions given here: http://wiki.zimbra.com/wiki/Adding_words_to_existing_aspell_dictionaries but I am not able to understand the commands given here and also where to type these commands. I tried executing these commands on command prompt but I keep getting errors regarding directory. This is what I am trying on command prompt.
My Aspell program's path is C:/Program Files (x86)/Aspell/
C:\Program Files (x86)>/Aspell/bin/./aspell --lang=en create master yourl
ist.rws < C:/Users/admin/Desktop/yourlist.txt
The system cannot find the path specified.
C:\Program Files (x86)>
Please tell me what am I doing wrong? I have not worked before on command prompt.
Also if there is any other easier alternative (like doing so form R GUI) please suggest that too.
Upvotes: 3
Views: 911
Reputation: 342
I know this thread is old and it's about Windows, but I was having trouble with getting this to work on Linux and this thread was one of the only search result that came up and it has no answer. So while this doesn't answer the exact question, I wrote a script that allows you to add a word to a dictionary that hopefully will help some people.
First, run the following command to determine what your default dictionary name is:
$ aspell dump config | grep "default: <lang>"
Then in a new file (I named mine addword
):
#!/bin/bash
# This should be whatever your path to your aspell directory is
ASPELL_DIR=/usr/lib/aspell-0.60
# Make sure to change this to the proper dictionary name
ENGLISH_DICT="$ASPELL_DIR/<your-default-dictionary>.multi"
# And name this to the filename you want for your dictionary
MY_DICT_NAME="my-dict"
# then the directory path to that file
MY_DICT_SRC="/path/to/dict/$MY_DICT_NAME.txt"
MY_DICT_DEST="$ASPELL_DIR/$MY_DICT_NAME.rws"
if [ "$EUID" -ne 0 ]; then
echo "You must execute this script as root."
exit -1;
fi
if [ $# -eq 0 ]; then
echo "No arguments supplied"
else
if ! grep -q "$MY_DICT_NAME.rws" "$ENGLISH_DICT" ; then
echo "add $MY_DICT_NAME.rws" >> "$ENGLISH_DICT"
echo "Adding $MY_DICT_DEST to $ENGLISH_DICT"
fi
echo "$1" >> "$MY_DICT_SRC"
echo "Adding '$1' to English dictionary $MY_DICT_SRC"
sudo aspell --lang=en create master "$MY_DICT_DEST" < "$MY_DICT_SRC"
fi
And then running
sudo addword aragorn
will add the word "aragorn" to your default dictionary.
I know this thread was long dead, but thought this might be useful!
Upvotes: 3