LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-16-2012, 05:39 PM   #1
daz__
Member
 
Registered: Feb 2012
Posts: 32

Rep: Reputation: Disabled
Help me gain an understanding of the linux spell checking dictionary


I recently upgraded to slackware 14.0. Very happy with the move.

What I am trying to do was a hint from my teacher to class that if someone could come up with a dictionary on a paticular subject there would be a lot of happy people out there. So I have my database of 1,000,000 + words and I need to test it but I cant figure out slackwares dictionary system.

in /usr/share there is no ispell and also there is no hunspell.
after locate *.dict i found no entries hinting at a system wide dictionary file

I did notice a /usr/share/dict/words. could this be the dictionary file.

Slackware 14 is using caligra words as the wordprocesser. Which dictionary would this be using and where would it be located.

and if I wished to add a personal dictionary what would someone suggest.

Any help offerd would be greatly appreciated.

thank you in advance.

daz__
 
Old 12-16-2012, 06:45 PM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 755

Rep: Reputation: 227Reputation: 227Reputation: 227
Slackware has aspell, however I don't know what calls it and what uses its own spell checker.

If your application does use aspell then there is a dictionary file in the home directory you can add to.
 
Old 12-16-2012, 07:02 PM   #3
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wildwizard View Post
Slackware has aspell, however I don't know what calls it and what uses its own spell checker.

If your application does use aspell then there is a dictionary file in the home directory you can add to.
thank you any idea how I would go about finding out which spell my prog is using. hunspell aspell and ispell all seem installed. I haven't noticed any spell check files in my home directory. I tried adding a hunspell_default in my home directory but issuing hunspell -D doesn't seem to pick that dictionary up.

daz
 
Old 12-17-2012, 01:42 PM   #4
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
197 views and no takers????

Comon guy n gals,

Someone must know something of these dictionaries.

Been at this since yesterday evening...

I will enact the story to date,

I have slackware 14.0.
was using 13.37 and moved for the mobile broadband support.
I am still very happy with 14.o and I know the issue I have now would be same with 13.37.
14.0 has hunspell, aspell and ispell installed.

aspell and ispell appear to have dictionaries installed
hunspell had no dictionaries installed

My intention was to create the dictionary I intend to create as a personal dictionary which could be used in conjunction with the existing master dictionary which i am assuming is aspell. I followed the instructions on the aspell site to create a personal dictionary http://aspell.net/man-html/Format-of...t-Dictionaries

When I create the file the spell check fails completly. Wont recgonize mispelled words and when deleted all programs resume spell checking as normal after restart of application. To test the spell check file I am inserting a dummy word I have instructed the file to accept as a word but nothing happens and when I type a different word I know is wrongly spelled it doesn't pick the word as a mistake which leads me to believe the spell check fails on creation of this aspell personal dictionary file. Some of the hacks i have encountered have had aspell version 1.1 as the first line in the header for the personal dictionary file. my version of aspell is 0.60.6. even changing the header version hasn't helped.
following is the header file i am using for the personal dictionary.

Quote:
personal_ws-0.60.6 en 1
jimmydoo
the file name for personal dictionary is following.

Quote:
.aspel.en.pws
This prob is really wrecking my head and have searched using every combination of terms I can think of to no avail.

I really wish to get away from this trivial problem and move on the more interesting problem of the dictionary.

Does anyone have any ideas on what is going on here.

I dont care if you think your idea is stupid. Anything that could get my head moving in the right direction would be a great help.

With breath held

daz
 
Old 12-17-2012, 02:40 PM   #5
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
212 and still no takers

another angle I am looking at is Sonnet and Enchant.
Have these programs got something to do with this.

I have noticed a $HOME/.kde/.config/enchant

there are dictionary files and exc files within.
they are empty though

daz
 
Old 12-17-2012, 05:27 PM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I don't really understand you question.

Did you use aspell with the normal dictionary? Which language do you use? In Slackware the aspell dictionaries for English are installed by default, the dictionaries for other languages can be downloaded (or found on the DVD) in the /extra/spell-word-lists/ directory.

When you have installed the dictionary for the language which is configured in /etc/profile.d/lang.sh aspell will automatically use this dictionary. The syntax is
Code:
aspell -c mytext-to-check.txt
Did you read the manpage for aspell? afaik aspell includes the functionality of hunspell and ispell.

I would recommend that you use aspell once with the normal dictionary, if this works you may take a look at personal dictionaries.

And please describe clearer what you did and what you achieved so far.

Here I have valid files .aspell.de.prepl, .aspell.de.pws, .aspell.en.prepl and .aspell.en.pws, they have been created automatically while spellchecking.

Markus

BTW: if your filename is really aspel.en.pws and not aspell.en.pws, how should this work?

Last edited by markush; 12-17-2012 at 05:29 PM.
 
Old 12-17-2012, 06:45 PM   #7
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
I don't really understand you question.

Did you use aspell with the normal dictionary? Which language do you use? In Slackware the aspell dictionaries for English are installed by default, the dictionaries for other languages can be downloaded (or found on the DVD) in the /extra/spell-word-lists/ directory.

When you have installed the dictionary for the language which is configured in /etc/profile.d/lang.sh aspell will automatically use this dictionary. The syntax is
Code:
aspell -c mytext-to-check.txt
Did you read the manpage for aspell? afaik aspell includes the functionality of hunspell and ispell.

I would recommend that you use aspell once with the normal dictionary, if this works you may take a look at personal dictionaries.

And please describe clearer what you did and what you achieved so far.

Here I have valid files .aspell.de.prepl, .aspell.de.pws, .aspell.en.prepl and .aspell.en.pws, they have been created automatically while spellchecking.

Markus

BTW: if your filename is really aspel.en.pws and not aspell.en.pws, how should this work?
thanks markush,
I will start at the end of your reply. The file aspel.en.pws was a mispelling on my behalf I realized when i posted but was too late to change. my file was infact aspell.en.pws sorry about that.

I just ran a spell check and none of the files you mentioned eg .prepl, pws have been created. I ran spell check with calligra.

My achivements so far,,,
a sore head
many google searches
a visit to #caligra on freenode
avisit to #slackware on freenode
a visit to #kde-devel on freenode
email to patrick

just before i checked in here had an interesting chat in kde-devel,
I explained I wanted to create a dictionary of scientific terms and use in cunjunction with the standard dictionary in slackware. They say it wont work and i will need to create my dictionary and merge it with the standard english from slackware. so i got a link to a piece of code http://quickgit.kde.org/?p=kdelibs.g...aspelldict.cpp and with that piece of code i must make a few files a .rws and a few others and my word list i presume merged with the standard word list and follow the tutorial http://blog.copyninja.info/2011/05/t...tionaries.html to create an aspell dictionary to use.

Now that is all well and good but as far as i can see now i still don't know which spell checker calligra or kwrite is using and since i ran a spell check with calligra just a moment ago and no aspell files were created i can only presume aspell is not being used by calligra. there was onone over in #calligra who knew how to help me.

i guess if i could figure out which spell program was being used would be a great help?
The spell check is working till i create the aspell.en.pws file then fails
I did read the aspel man page.
that is how i got the recipe to create my own .pws file.
how can i figure out which spell checker is being used by
1 calligra
2 kwrite

is there a config file for the spell checker?
is that config file part of sonnet or is it part of enchant which is standing between the spell checker and the app.

basically i am lost now and more confused than when i started this project.

thanks again for your interest

daz


ps aspell is working as i tested from the command line. ispell is also working. and hunspell was working till i removed the dictionaries to test an idea. sorry hunspell had no dictionaries originally and i got some and installed them since some people were having problems over at the calligra forum and this solved their problems but not mine so i removed them. the guys over at #calligra say calligra will use aspell or hunspell. they didn't mention ispell.

Last edited by daz__; 12-17-2012 at 06:55 PM. Reason: forgot something
 
Old 12-17-2012, 09:00 PM   #8
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by markush View Post
I don't really understand you question.

Did you use aspell with the normal dictionary? Which language do you use? In Slackware the aspell dictionaries for English are installed by default, the dictionaries for other languages can be downloaded (or found on the DVD) in the /extra/spell-word-lists/ directory.

When you have installed the dictionary for the language which is configured in /etc/profile.d/lang.sh aspell will automatically use this dictionary. The syntax is
Code:
aspell -c mytext-to-check.txt
Did you read the manpage for aspell? afaik aspell includes the functionality of hunspell and ispell.

I would recommend that you use aspell once with the normal dictionary, if this works you may take a look at personal dictionaries.

And please describe clearer what you did and what you achieved so far.

Here I have valid files .aspell.de.prepl, .aspell.de.pws, .aspell.en.prepl and .aspell.en.pws, they have been created automatically while spellchecking.

Markus

BTW: if your filename is really aspel.en.pws and not aspell.en.pws, how should this work?
Thanks markush,

I see what you mean now by running the aspell prog on its own.
When I ran the spell check from kwrite and calligra i made the assumption that since calligra and kwrite also use aspell that the files would be created by running the spell check from programs mentioned. ok it starts to make sense now. I now have enough knowledge to be dangerous. Thanks for your help and tolerating my stupid question.

daz
 
Old 12-18-2012, 01:42 AM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
As far as I know calligra comes with it's own spellingchecker and dictionaries.

As for the editor, for example Vim can use aspell for spellchecking, but for kwrite I could not find an option.

Markus
 
Old 12-18-2012, 07:44 PM   #10
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
cheerz for the help

Quote:
Originally Posted by markush View Post
As far as I know calligra comes with it's own spellingchecker and dictionaries.

As for the editor, for example Vim can use aspell for spellchecking, but for kwrite I could not find an option.

Markus
thank you markush. I really feel i am on the right track now. spell check is not something I use very often. I find it strange that the guys over at #calligra couldn't tell me that calligra has its own spell check and then send me to #kde-devel. The chanel user I spoke to was certain calligra used either hunspell or aspell. hmmm. could have been talking to a spook i guess. I feel so stupid though. messing around with slackware for the last 2 years and never though to feed the file i want to check into either ispell, aspell or hunspell. feck im stoopid. i am now on the way to creating my first dictionary and I am now discovering a whole host of problems designed specifically for me. thank you for getting me on the way...

peace to you

daz
 
Old 12-19-2012, 01:16 AM   #11
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,974

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
You would have to run calligra and find out if there is an option where you can choose the spellingchecker, if there is none, it uses its own.

Markus
 
Old 12-19-2012, 07:55 AM   #12
daz__
Member
 
Registered: Feb 2012
Posts: 32

Original Poster
Rep: Reputation: Disabled
Recipe followed to create dictionary

The following links will help you get going making a dictionary.
First if you intend to use aspell for your spell checker in conjunction with your new dictionary make sure you have no hyphenated words in your dictionary as aspell just cant handle hyphenated words.

I have settled on hunspell for use with my dictionary as it wont complain and crash out on encountering an hyphenated word.

I found a cool page that will walk you through the basics of getting you up and running. It explains the set up of the word list. It doesn't tell you to insert the number of word in you dictionary as the first line in the dictionary. Without this it wont work. It will also get you up and running with a basic affix file and how to create basic rules and how to generate a word frequency list so hunspell will suggest words mispelled. http://www.suares.com/index.php?page_id=25&news_id=233

What suares site doesn't tell you is where to put the generated word frequency list. You can find that information at the following site. http://manpages.ubuntu.com/manpages/...unspell.4.html It contains all the informaton you need to set up the affix file and all the strange classes that can be in the file which you can apply to your dictionary to make it smaller.

Hope this helps

daz

Last edited by daz__; 12-19-2012 at 07:58 AM. Reason: forgotton word
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spell Checking in Arch Linux MTK358 Linux - Software 22 03-24-2010 04:07 PM
Spell Checking CouchMaster Ubuntu 5 03-31-2005 03:10 PM
Linux Dictionary file used for spell checking AMDPwred Linux - General 1 03-03-2004 04:15 PM
Somebody should edit the spell check dictionary... ranger_nemo LQ Suggestions & Feedback 1 01-24-2004 11:33 AM
spell checking mindcry Linux - Software 5 10-09-2003 07:41 PM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration