How to add words in aspell dictionary?
Asked Answered
S

3

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

Schlimazel answered 3/6, 2015 at 12:55 Comment(1)
This question is definitely not a general question about computing hardware and software. It is a LiveCode programming question and should not be closed.Suffice
H
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.

Haemophilic answered 3/6, 2015 at 13:6 Comment(2)
In LiveCode, that would be: get shell("echo" && quote & "*WORD\n#" & quote && "| aspell -a")Suffice
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.Schlimazel
J
3

To add a new word newword, do:

echo -e "*newword\n#" | aspell -a
Jehanna answered 11/10, 2018 at 10:13 Comment(0)
B
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
Butanone answered 16/2, 2020 at 23:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.