LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Facing issue with Aspell. (Conversion of .rws file to .txt file) (https://www.linuxquestions.org/questions/red-hat-31/facing-issue-with-aspell-conversion-of-rws-file-to-txt-file-4175504036/)

amolredhat 05-05-2014 11:39 PM

Facing issue with Aspell. (Conversion of .rws file to .txt file)
 
Hello,

Below are the steps which I had followed while Creating .rws file in Redhat linux.

1) # copy hindi-words.txt to /tmp
2) # dos2unix /tmp/hindi-words.txt (convert dos file format to unix file format)
3) # aspell --lang=hi --encoding=utf-8 create master /tmp/hindi-words.rws < /tmp/hindi-words.txt
4) Move file hindi-words.rws to /usr/lib/aspell-0.60
5) And, add hindi-words.rws name in hi-multi file.

Now situation is, I have only .rws file (in /usr/lib/aspell-0.60) which needed to converted in Hindi (Language). Please let us know how can I convert .rws file to .txt file in Hindi Language,so that words can be corrected in dictionary.

==================
# aspell -version:- International Ispell Version 3.1.20 (but really Aspell 0.60.3)]
# Server:- Red Hat Enterprise Linux Server release 5.8
==================

I have tried to convert .rws file to txt from aspell command but did not worked, but not able to view contents in the file, Whole file is showing in different characters....

Please help.

dijetlo 05-16-2014 06:47 AM

Hey Amol,

Quote:

I have tried to convert .rws file to txt from aspell command but did not worked, but not able to view contents in the file, Whole file is showing in different characters....
It's been compiled from a word list imported by Aspell. You did that when you ran this command
Code:

aspell --lang=hi --encoding=utf-8 create master /tmp/hindi-words.rws < /tmp/hindi-words.txt
If you want to edit it, edit the wordlist and recompile it.
Check
Code:

aspell dump config
for the default directories aspell is looking for .rws files in, either move your rws file out of /tmp to /usr/lib/aspell/* or use the basedir switch to redirect aspell to /tmp. Change the name of your .rws file so it begins with hi, something like "hi_region_some_identifier.rws". Put your .multi file ~the file aspell is actually going to use to find a "hi" dict~ into the same directory and name it something like (hi_region_some_identifier.multi) and have it point to your shiny new rws file. (The multi files are not compiled, so you can open an existing one in nano or vi, edit it, and then save it under the new name.)
Once you've done that, running
Code:

aspell -l hi dump master
Ought to give you your word list in Hindi

Hope that helps

I'd strongly encourage you to look at the site maintained by the aspell project, particularly sections 4 and 5 (customizing aspell and working with dictionaries). It would help you significantly.


All times are GMT -5. The time now is 04:08 AM.