Pspell use only custom dictionary

六眼飞鱼酱① 提交于 2019-12-22 09:55:10

问题


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
  1. 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

  1. To finish adding it to the dictionary change into the dictionary directory by running the following:

    cd /usr/lib/aspell/

  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!