问题
question like this post: How to disable default English dictionary in Pspell and use only Custom dictionary?
I create my custom dictionary. And test in console - all work fine. Console query like this:
echo Engenier | aspell -a -d /var/www/Lib/profiles.rws
result - only 1 suggestion. It`s correct result
But i cant repeat this result with pspell
I try this variant (http://board.phpbuilder.com/showthread.php?10298706-Resolved-pspell-hell), but this doesn`t help me
All time in many variants load base "EN" dictionary with my custom. But i need only custom
How I can use only my dict?
PS: pspell - aspell for php http://www.php.net/manual/en/ref.pspell.php
回答1:
Hi i have followed the below procedure to enable my custom dictionary only.
Creation of custom dictionary:
1. Create a file called custom.txt in your home directory
touch ~/custom.txt
- Add the words that you'd like to add to the dictionary, where each word is on a separate line, then run the following command
sudo aspell --lang=en create master /usr/lib/aspell/custom.rws < ~/custom.txt
To finish adding it to the dictionary change into the dictionary directory by running the following:
cd /usr/lib/aspell/
then edit the following file:
en.multi
and add the following line:
add custom.rws
5 .Then the new words should be available to you in Aspell. If you want to add words to this list in future, edit the ~/custom.txt
file and run this command again:
sudo aspell --lang=en create master /usr/lib/aspell/custom.rws < ~/custom.txt
Removing default english dictionary:
Open usr/lib/aspell/en.multi
file. And comment the following line
#add en-wo_accents.multi
Then the custom words only should be available to you in Aspell.
来源:https://stackoverflow.com/questions/23133601/pspell-use-only-custom-dictionary