spell-checking working

View: New views
9 Messages — Rating Filter:   Alert me  

spell-checking working

by Josip-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all!

I can't find nothing about spell checking for windows on gramps wiki, so
not sure is this really a problem or not.

As someone on this list asked about it few months ago i can say that it
can be done easily and works good in Windows 7 (using python 2.6).
I just crosscompile for windows few libs in linux.
Ispell or myspell dictionaries can be used.

Used for that:
        GTKSpell 2.0.15
        PyGTKSpell from gnome-python-extras 2.25.3
        Enchant 1.4.2
        PyEnchant 1.5.3

--
Josip

------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: spell-checking working

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Greetings,

@Josip
That sounds really good. I would like to try this on Vista too. But I'm not a programmer for this stuff.
Could you provide the special builded objects some where and the information where to place the objects and dictionaries, please.

-Helge

Re: spell-checking working

by Josip-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Helge@GRAMPS wrote:

> Greetings,
>
> @Josip
> That sounds really good. I would like to try this on Vista too. But I'm not
> a programmer for this stuff.
> Could you provide the special builded objects some where and the information
> where to place the objects and dictionaries, please.
>
> -Helge
>

Hi i put file on wiki page
http://www.gramps-project.org/wiki/index.php?title=Windows_installer#Additional_plugins
with name "Gramps spell-win32-py26.zip"

Remember it is for Python version 2.6 only
There is no install just copy two directories in place which is suitable
for your system. That mean copy stuff from Python26 directories to your
python installation, and stuff from GTK2 to your gtk installation path
or anywhere else where the bin subdirectory will be in environmental path.

File is 1+MB large because allready contains two dictionaries (1 ispell
and 1 myspell so it can be quick check for working)

If you tray it, please post back result.

***Please check it with some antivirus first (i am not home in windows)

--
Josip

------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: spell-checking working

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

thank you for the quick reaction.

I got the ZIP file, checked it against viruses (no problem found) and stored all files in
    C:\Program Files\Phyton 2.6\Lib\site-packages\

Than I told GRAMPS in the Preferences option to use the Spell checker...
But after restarting GRAMPS I got again the message:
         2838: WARNING: spell.py: line 66: Spelling checker is not installed
So some thing my be wrong for a complete setup of the spell.

My environment is:
Python   2.6.1
GTK+     2.14.7
pyGTK    2.12.1
gobject  2.14.2
cairo    1.4.12

I use MS Vista Home - German language.
Could it be that I neet a German Ispell or myspell?
-Helge

Re: spell-checking working

by Josip-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Helge@GRAMPS wrote:

> Hi,
>
> thank you for the quick reaction.
>
> I got the ZIP file, checked it against viruses (no problem found) and stored
> all files in
>     C:\Program Files\Phyton 2.6\Lib\site-packages\
>
> Than I told GRAMPS in the Preferences option to use the Spell checker...
> But after restarting GRAMPS I got again the message:
>          2838: WARNING: spell.py: line 66: Spelling checker is not installed
> So some thing my be wrong for a complete setup of the spell.
>
> My environment is:
> Python   2.6.1
> GTK+     2.14.7
> pyGTK    2.12.1
> gobject  2.14.2
> cairo    1.4.12
>
> I use MS Vista Home - German language.
> Could it be that I neet a German Ispell or myspell?
> -Helge


Not all files. Structure should look as:
# are comments
=====================================================================================
--C:\Program Files\Phyton 2.6\Lib\site-packages
        --enchant #this is PyEnchant
                --checker
                --tokenize
        --gtk-2.0
                --gtkspell.pyd #this is PyGTKSpell

--C:\Program Files\GTK2\bin
        --lib
                --enchant
                        --libechant_myapell.dll #library enchant uses so no externall
stuff is neded
                        --libechant_ispell.dll
        --share
                --echant
                        --myspell #myspell dics go in there
                        --ispell #same for ispell
                        --enchant.ordering #sets priority of dics
        --libenchant.dll #this is Enchant main library
       
====================================================================================

You can replace "C:\Program Files\GTK2\bin" with anything you like but
that location must be searchable by system (in PATH variable).
Only thing is that you must retain subdirectories order because enchant
search path is hardcoded

"myspell" folder already contains en_US dictionary (put any dictionary
you like in this folder) in gramps do right click on some word in note
view an pick language you like to use (no german for now so there is not
one set as default, dictionaries are big so it will be cca 20MB for all
20 languages gramps now support.

After you make it work download from web dictionaries you like to use
and put in myspell or ispell folder

--
Josip





------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: spell-checking working

by steve_geo :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Josip,

Your directory structure is really interesting, .. when I download
pyEnchant windows binary from their web site (
http://www.rfk.id.au/software/pyenchant/ ) and install, it installs
entirely under python\Lib\site-packages
including:
    dictonaries
    libechant_myspell.dll
    libechant_ispell.dll

I would expect that since enchant is NOT part of a GUI widget set that
it's files should NOT be stored in the widget sets directories ?
- I mean wxWidgets can use enchant, yet it should not need to look in
GTK directories to find the dll's

-  So can your GTKSpell be used with the official pyEnchant library? -
It needs to be at least able to co-exist, as pyEnchant may be installed
for other applications.

Enchant is the backend behind GTKSpell, and enchant can use Open Office
dictionaries which does have a German version. After installing a
dictionary, it will become available in the note context menu for
language selection (GRAMPS may need to be restarted after installation
to see the new language not sure)

The 'magic' needed to get spelling to work under windows is GTKSpell
binary (pyEnchant is already there and done), any chance that once you
have it packaged nicely you can contribute it back the GTKSpell project
so they can make the binary available for all users.
 
Steve

Josip wrote:

> Helge@GRAMPS wrote:
>  
>> Hi,
>>
>> thank you for the quick reaction.
>>
>> I got the ZIP file, checked it against viruses (no problem found) and stored
>> all files in
>>     C:\Program Files\Phyton 2.6\Lib\site-packages\
>>
>> Than I told GRAMPS in the Preferences option to use the Spell checker...
>> But after restarting GRAMPS I got again the message:
>>          2838: WARNING: spell.py: line 66: Spelling checker is not installed
>> So some thing my be wrong for a complete setup of the spell.
>>
>> My environment is:
>> Python   2.6.1
>> GTK+     2.14.7
>> pyGTK    2.12.1
>> gobject  2.14.2
>> cairo    1.4.12
>>
>> I use MS Vista Home - German language.
>> Could it be that I neet a German Ispell or myspell?
>> -Helge
>>    
>
>
> Not all files. Structure should look as:
> # are comments
> =====================================================================================
> --C:\Program Files\Phyton 2.6\Lib\site-packages
> --enchant #this is PyEnchant
> --checker
> --tokenize
> --gtk-2.0
> --gtkspell.pyd #this is PyGTKSpell
>
> --C:\Program Files\GTK2\bin
> --lib
> --enchant
> --libechant_myapell.dll #library enchant uses so no externall
> stuff is neded
> --libechant_ispell.dll
> --share
> --echant
> --myspell #myspell dics go in there
> --ispell #same for ispell
> --enchant.ordering #sets priority of dics
> --libenchant.dll #this is Enchant main library
>
> ====================================================================================
>
> You can replace "C:\Program Files\GTK2\bin" with anything you like but
> that location must be searchable by system (in PATH variable).
> Only thing is that you must retain subdirectories order because enchant
> search path is hardcoded
>
> "myspell" folder already contains en_US dictionary (put any dictionary
> you like in this folder) in gramps do right click on some word in note
> view an pick language you like to use (no german for now so there is not
> one set as default, dictionaries are big so it will be cca 20MB for all
> 20 languages gramps now support.
>
> After you make it work download from web dictionaries you like to use
> and put in myspell or ispell folder
>
> --
> Josip
>
>
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gramps-windows mailing list
> Gramps-windows@...
> https://lists.sourceforge.net/lists/listinfo/gramps-windows
>
>  


------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: spell-checking working

by Josip-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Stephen George wrote:

> Hi Josip,
>
> Your directory structure is really interesting, .. when I download
> pyEnchant windows binary from their web site (
> http://www.rfk.id.au/software/pyenchant/ ) and install, it installs
> entirely under python\Lib\site-packages
> including:
>    dictonaries
>    libechant_myspell.dll
>    libechant_ispell.dll
>
> I would expect that since enchant is NOT part of a GUI widget set that
> it's files should NOT be stored in the widget sets directories ?
> - I mean wxWidgets can use enchant, yet it should not need to look in
> GTK directories to find the dll's
>
> -  So can your GTKSpell be used with the official pyEnchant library? -
> It needs to be at least able to co-exist, as pyEnchant may be installed
> for other applications.
>
> Enchant is the backend behind GTKSpell, and enchant can use Open Office
> dictionaries which does have a German version. After installing a
> dictionary, it will become available in the note context menu for
> language selection (GRAMPS may need to be restarted after installation
> to see the new language not sure)
>
> The 'magic' needed to get spelling to work under windows is GTKSpell
> binary (pyEnchant is already there and done), any chance that once you
> have it packaged nicely you can contribute it back the GTKSpell project
> so they can make the binary available for all users.
>
> Steve
>

Yes Steve i partially agree with you!

Enchant don't belong to GTK2 folder, and i clearly say (hope so) that
can be put in any other folder as long as their path is in %PATH%
eviroment variable.

But they also do not belong to any Python folder. Why? It is not python
application or some C extension for python, it is library which should
be used system wide by any application that need their services.
Although dictionaries can be installed per user base (or just their
order of use)

For python to use that there is PyEnchat, which do belong to python folder.

As i was playing with some other gtk stuff they all ended there.(no real
reason)

About packaging that...no thanks;)
You seems to have enchant working so you just need gtkspell.pyd but
other people maybe not. Even respective author of PyEnchant decided to
package his work for windows precompiled and together with Enchant
library and dicts to help user to start using his work.
If i was posted only "gtkspell.pyd" user will have even more trouble to
make it work (not to mention if they was in some /lib|/bin|/share
folders together with import libraries and header files)

One note also
Looks like enchant is picky about dir structure and can even use
registry for search, see:
http://www.wesay.org/blogs/palaso/2008/02/22/configuring-where-enchant-looks-for-files/


--
Josip



------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows

Re: spell-checking working

by Helge@GRAMPS :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

it works on Vista too!!!

I placed the stuff provided by Josip from "Gramps_spell-win32-py26.zip\Python26\site-packages" to "C:\Program Files\Phyton 2.6\Lib\site-packages\".
I didn't use the stuff provided by Josip from "Gramps_spell-win32-py26.zip\GTK2" because my folder structur differs.

Than I used from http://www.rfk.id.au/software/pyenchant/download.html the download for "pyenchant-1.5.3.win32.exe" just as is it.
There were some warnings about ?? (I forgot a screen shot, sorry).
All this stuff was installed to  "C:\Program Files\Phyton 2.6\Lib\site-packages\enchant". So it seems to me, the warnings concern to the folders already available before by copying from "Gramps_spell-win32-py26.zip\Python26\site-packages\enchant". So may be, these are not necessary. But I'm not sure.

Finally it works fine for me.
-Helge

Re: spell-checking working

by Josip-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Helge@GRAMPS wrote:

> Hi,
>
> it works on Vista too!!!
>
> I placed the stuff provided by Josip from
> "Gramps_spell-win32-py26.zip\Python26\site-packages" to "C:\Program
> Files\Phyton 2.6\Lib\site-packages\".
> I didn't use the stuff provided by Josip from
> "Gramps_spell-win32-py26.zip\GTK2" because my folder structur differs.
>
> Than I used from  http://www.rfk.id.au/software/pyenchant/download.html
> http://www.rfk.id.au/software/pyenchant/download.html  the download for
> "pyenchant-1.5.3.win32.exe" just as is it.
> There were some warnings about ?? (I forgot a screen shot, sorry).
> All this stuff was installed to  "C:\Program Files\Phyton
> 2.6\Lib\site-packages\enchant". So it seems to me, the warnings concern to
> the folders already available before by copying from
> "Gramps_spell-win32-py26.zip\Python26\site-packages\enchant". So may be,
> these are not necessary. But I'm not sure.
>
> Finally it works fine for me.
> -Helge
>

Glad to hear that.

As Steve mentioned almost all stuff needed for spellchecking to work
already exists in windows version (namely Enchant an PyEchant) only
thing windows lack is PyGTKSpell so i compile it from gnome-python-extra
(gtkspell.pyd).

--
Josip

------------------------------------------------------------------------------
_______________________________________________
Gramps-windows mailing list
Gramps-windows@...
https://lists.sourceforge.net/lists/listinfo/gramps-windows