10

I am using aspell in my application for spell checking. I don't have any idea about how to add words in aspell. Is it any way to add words

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
RAHUL.S. KRISHNA
  • 221
  • 1
  • 3
  • 8
  • This question is definitely not a general question about computing hardware and software. It is a LiveCode programming question and should not be closed. – Mark Jun 03 '15 at 14:22

3 Answers3

6

To add words you feed in a list. If the word has a asterisk at the front it is added to the current dictionary. If there is a single line with a hash then the newly added words are saved to the users personal dictionary and then can be used through out the system.

echo "*WORD\n#" | aspell -a

There are multiple things you can do in relation to adding words to your dictionary and you can read about them here.

Songy
  • 851
  • 4
  • 17
  • 1
    In LiveCode, that would be: `get shell("echo" && quote & "*WORD\n#" & quote && "| aspell -a")` – Mark Jun 03 '15 at 14:20
  • 2
    it's shows an error @(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7-20110707) Error: The word "WORD\n#" is invalid. The character '\' (U+5C) may not appear in the middle of a word. – RAHUL.S. KRISHNA Jun 04 '15 at 08:54
3

To add a new word newword, do:

echo -e "*newword\n#" | aspell -a
Nathan B
  • 1,625
  • 1
  • 17
  • 15
0

Songy's example echo "*WORD\n#" | aspell -a worked for me for a single word. I was able to add text file (input.txt) containing a list of words using this command:

cat input.txt | while read word; do echo -e "*${word}\n#" | aspell -a; done
Michael Behrens
  • 911
  • 10
  • 8