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
How to add words in aspell dictionary?
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
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.
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
To add a new word newword, do:
echo -e "*newword\n#" | aspell -a
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
© 2022 - 2024 — McMap. All rights reserved.