The Google spell check guy has released his non-Google spell check option, Nox Spell Server. It's a server that runs Python and talks, via a local port, to Aspell - his comments:
Nox Spell Server is a little Python Aspell server that is fully compatible with GoogieSpell. If you are concerned over privacy or reliability of Google's spell service, then look no more, because you found your solution Aspell also supports far more languages than Google spell service.
http://orangoo.com/labs/?page_id=72
So this is very cool, and exactly what I was looking for, however it does mean that people that want to use it with Roundcube need to run this as a server/service for Roundcube to connect to. Can we include this in Roundcube, but have it in the config where it uses Google by default, and Nox if you call it out within the config? This way RC will work 'out of the box' but also allow you to use your local spell server, once it's config'd. I'm on vacation, but I'll start looking at this later in the week - would like to start testing this right away, if it weren't for this nice beach outside!
http://fak3r.com - you don't have to kick it
phil wrote:
The Google spell check guy has released his non-Google spell check option, Nox Spell Server. It's a server that runs Python and talks, via a local port, to Aspell
[...]
So this is very cool, and exactly what I was looking for, however it does mean that people that want to use it with Roundcube need to run this as a server/service for Roundcube to connect to. Can we include this in Roundcube
[...]
This is awesome! I believe the changes to make GoogieSpell use this are on a small part of the javascript, so, for RoundCube use it should be a breeze.
I vote for it.
phil wrote:
So this is very cool, and exactly what I was looking for, however it does mean that people that want to use it with Roundcube need to run this as a server/service for Roundcube to connect to.
The obvious solution is to port RoundCube to Python-Nevow ;-)
phil wrote:
The Google spell check guy has released his non-Google spell check option, Nox Spell Server. It's a server that runs Python and talks, via a local port, to Aspell - his comments:
Nox Spell Server is a little Python Aspell server that is fully compatible with GoogieSpell. If you are concerned over privacy or reliability of Google's spell service, then look no more, because you found your solution Aspell also supports far more languages than Google spell service.
http://orangoo.com/labs/?page_id=72
So this is very cool, and exactly what I was looking for, however it does mean that people that want to use it with Roundcube need to run this as a server/service for Roundcube to connect to. Can we include this in Roundcube, but have it in the config where it uses Google by default, and Nox if you call it out within the config? This way RC will work 'out of the box' but also allow you to use your local spell server, once it's config'd. I'm on vacation, but I'll start looking at this later in the week - would like to start testing this right away, if it weren't for this nice beach outside!
I managed to get this up and running and working with Roundcube rather easily. I did have to make a couple slight changes in the code to make it configurable (and default to using Google).
Apply the attached patch to program/steps/mail/spell.inc and then add these config variables in config/main.inc.php:
$rcmail_config['googiespell_server'] = "127.0.0.1"; $rcmail_config['googiespell_port'] = "14003"; $rcmail_config['googiespell_path'] = "/?lang=";
Start your nox server, and away it goes...
Note: I had to edit nox's run_server.py and tell it not to use Google there, too.
Jim
--- program/steps/mail/spell.inc (revision 283) +++ program/steps/mail/spell.inc (working copy) @@ -24,10 +24,11 @@
$REMOTE_REQUEST = TRUE;
-$google = "ssl://www.google.com"; -$port = 443; +$google = $CONFIG['googiespell_server'] ? $CONFIG['googiespell_server'] : "ssl://www.google.com"; +$port = $CONFIG['googiespell_port'] ? $CONFIG['googiespell_port'] : "443"; $lang = $_GET['lang']; -$path = "/tbproxy/spell?lang=$lang"; +$path = $CONFIG['googiespell_path'] ? $CONFIG['googiespell_path'] . $lang : "/tbproxy/spell?lang=$lang";
$data = file_get_contents('php://input'); $store = "";
On Fri, 28 Jul 2006 12:25:06 -0400, Jim Pingle lists@pingle.org wrote:
phil wrote:
The Google spell check guy has released his non-Google spell check
option, Nox Spell Server. It's a server that runs Python and talks, via a local port, to Aspell - his comments:
Nox Spell Server is a little Python Aspell server that is fully
compatible with GoogieSpell. If you are concerned over privacy or reliability of Google's spell service, then look no more, because you found your solution Aspell also supports far more languages than Google spell service.
http://orangoo.com/labs/?page_id=72
So this is very cool, and exactly what I was looking for, however it
does mean that people that want to use it with Roundcube need to run this as a server/service for Roundcube to connect to. Can we include this in Roundcube, but have it in the config where it uses Google by default, and Nox if you call it out within the config? This way RC will work 'out of the box' but also allow you to use your local spell server, once it's config'd. I'm on vacation, but I'll start looking at this later in the week - would like to start testing this right away, if it weren't for this nice beach outside!
I managed to get this up and running and working with Roundcube rather easily. I did have to make a couple slight changes in the code to make it configurable (and default to using Google).
Apply the attached patch to program/steps/mail/spell.inc and then add these config variables in config/main.inc.php:
$rcmail_config['googiespell_server'] = "127.0.0.1"; $rcmail_config['googiespell_port'] = "14003"; $rcmail_config['googiespell_path'] = "/?lang=";
Start your nox server, and away it goes...
Note: I had to edit nox's run_server.py and tell it not to use Google there, too.
Jim
Hi Jim,
Thanks for looking at this. I'd contacted the developer as well but never got a response. Glad to see the source is out.
I think its fine initially to run the spell server via python, but what I was hoping to do is actually port the Nox Server to PHP so that it can be fully integrated into RoundCube. I think you are correct that the admin/user must still have the option of using Google or ASpell, since ASpell must still be installed separately even if the Nox portion is ported to PHP.
I've got time to play around with this over the next week or so, if people agree this is a good idea. Does any one see any issues with this? Technically, or from a licensing perspective? Nox is GPL'd so I think we're ok?
Cheers,
Andrew
Andrew Fladmark wrote:
Thanks for looking at this. I'd contacted the developer as well but never got a response. Glad to see the source is out.
I think its fine initially to run the spell server via python, but what I was hoping to do is actually port the Nox Server to PHP so that it can be fully integrated into RoundCube. I think you are correct that the admin/user must still have the option of using Google or ASpell, since ASpell must still be installed separately even if the Nox portion is ported to PHP.
I've got time to play around with this over the next week or so, if people agree this is a good idea. Does any one see any issues with this? Technically, or from a licensing perspective? Nox is GPL'd so I think we're ok?
I agree that having it fully integrated into Roundcube would be great, I'd love to have a totally contained solution. The option for an external server could be desirable in some cases, too.
For some (like me) even though it's not as easy, having to run a separate server is acceptable. I trust Google well enough, but not so much I'd want to forward my user's mail to them, even over ssl. :) So until an integrated solution pops up, I am comfortable running it this way.
Fortunately, it doesn't look like porting it would be that difficult, especially if you left out the Google spell proxy. There's a good chunk of code that is there just to proxy spelling requests to Google instead of using Aspell. The heart of it is just a simple xmlrpc-like service (with hand-crafted xml, not even using an xml library -- not that there's anything wrong with that).
You could just point the GoogieSpell URL at localhost, port 80, "/spellcheck.php?lang=" and as long as it speaks the same protocol it should work. Although the GoogieSpell code appears to make a direct connection to a port -- I'm not sure if or how it would handle virtual hosts, but that may not be tough to fix.
Jim
On 7/28/06, Andrew Fladmark afladmark@orbital-web.com wrote:
I think its fine initially to run the spell server via python, but what I was hoping to do is actually port the Nox Server to PHP so that it can be fully integrated into RoundCube.
Not to start a flame war, but I am not sure if PHP is designed to run as a server. I know that people do it - the flickr people posted some interesting stuff about this (memory leaks).
I don't see what is wrong to "integrate" (plugin api) this with RC even if it's not written in PHP.
Till Klampaeckel e: mailto:klimpong@gmail.com p: +491704018676 l: http://beta.plazes.com/whereis/till
Want to know what's up in Berlin?
till wrote:
Not to start a flame war, but I am not sure if PHP is designed to run as a server. I know that people do it - the flickr people posted some interesting stuff about this (memory leaks).
I don't believe he was meaning port it as a PHP server, but rather mimic its functionality in PHP. Even if it was run as a server and written in PHP the same problem would be there - namely, that it requires admin access to run an additional process rather than being a PHP page/program.
I don't see what is wrong to "integrate" (plugin api) this with RC even if it's not written in PHP.
There is nothing wrong with having it, it's just not ideal. Many potential RC users would be running it in hosted space or on servers that they do not control. For them, a separate server process may be out of the question.
Jim
On Fri, 28 Jul 2006 16:39:00 -0400, Jim Pingle lists@pingle.org wrote:
till wrote:
Not to start a flame war, but I am not sure if PHP is designed to run as a server. I know that people do it - the flickr people posted some interesting stuff about this (memory leaks).
I don't believe he was meaning port it as a PHP server, but rather mimic its functionality in PHP. Even if it was run as a server and written in PHP the same problem would be there - namely, that it requires admin access to run an additional process rather than being a PHP page/program.
I don't see what is wrong to "integrate" (plugin api) this with RC even if it's not written in PHP.
There is nothing wrong with having it, it's just not ideal. Many potential RC users would be running it in hosted space or on servers that they do not control. For them, a separate server process may be out of the question.
Jim
Hi,
Sorry for the confusion. I did indeed mean that we'd aim to mimic the same functionality from within a simple PHP page which could be included as part of the RoundCube code. In theory, RoundCube could easily support any of the 3 possibilities (PHP port, the Nox service in Python, or GoogleSpell) since all three use essentially the same output syntax. All that is required is to change the URL/port to which the spelling code connects. This could be a config option, with the default being Google (since it requires no additional software to be loaded on the server).
Moving forward, I have an implementation question. From PHP, there are two ways we can talk to ASpell. One is the same as the Nox server's approach which is to execute and process command line output. The other is to use PHP's PSpell library. As I understand it, there are two issues here: 1. The command line option can be restricted for (obvious) security restrictions. 2. PSpell library has to be enabled.
I want to choose the option that has the greatest chance of being acceptable to admins and the least burden for setting up... Do most PHP environments allow command execution 'out-of-the-box'? If not, my feeling is that for anyone to use ASpell they'll need to install ASpell anyway so enabling the library extension probably isn't an unreasonable expectation. And we don't need to have a config parameter in RoundCube directly to deal with the path to ASpell's executable, which is another advantage.
Anyone have advice/thoughts on which is the preferrable route?
Thanks!
Andrew
Andrew Fladmark wrote:
Moving forward, I have an implementation question. From PHP, there are two ways we can talk to ASpell. One is the same as the Nox server's approach which is to execute and process command line output. The other is to use PHP's PSpell library. As I understand it, there are two issues here: 1. The command line option can be restricted for (obvious) security restrictions. 2. PSpell library has to be enabled.
I want to choose the option that has the greatest chance of being acceptable to admins and the least burden for setting up... Do most PHP environments allow command execution 'out-of-the-box'? If not, my feeling is that for anyone to use ASpell they'll need to install ASpell anyway so enabling the library extension probably isn't an unreasonable expectation. And we don't need to have a config parameter in RoundCube directly to deal with the path to ASpell's executable, which is another advantage.
Unfortunately there are probably many environments that have one or the other disabled.
I'm not sure how difficult it might be to implement both, and perhaps have some checks and try one, and fail back to the other. I would suggest preferring the pspell module, as it would probably be faster and more secure. However, (and this is just conjecture) I would think more sites may have command execution enabled than have the pspell module.
On FreeBSD, the pspell module is not included in the default php install and it is not a default selection in the php-extensions port. It is selectable, but it does require a conscious effort. I enable it on most of the installs that I do, but I can't speak for others.
On the other hand, executing commands is enabled by default, unless safe mode is on and even then you can specify a directory with allowed executables. Since aspell is a pretty popular library, I imagine at least some places offer it.
Jim
Hi,
I just added support for Nox Spell Server to the Trunk. The URL can be configured using only one config parameter and there's another parameter to specify the languages that are available for spell checking.
I don't have aspell installed to test it, so please can somebody confirm if my changes really work...
Regards, Thomas
Jim Pingle wrote:
I managed to get this up and running and working with Roundcube rather easily. I did have to make a couple slight changes in the code to make it configurable (and default to using Google).
Apply the attached patch to program/steps/mail/spell.inc and then add these config variables in config/main.inc.php:
$rcmail_config['googiespell_server'] = "127.0.0.1"; $rcmail_config['googiespell_port'] = "14003"; $rcmail_config['googiespell_path'] = "/?lang=";
Start your nox server, and away it goes...
Note: I had to edit nox's run_server.py and tell it not to use Google there, too.
Jim
Thomas Bruederli wrote:
Hi,
I just added support for Nox Spell Server to the Trunk. The URL can be configured using only one config parameter and there's another parameter to specify the languages that are available for spell checking.
I don't have aspell installed to test it, so please can somebody confirm if my changes really work...
Thomas,
It works for me. I pointed the spellcheck_uri at '127.0.0.1:14003/?lang=' and it took right off.
Thanks!
Jim
Has anyone written a LaunchServices property file yet to automatically start the Nox server on Mac OS X?
Thomas Bruederli wrote:
Hi,
I just added support for Nox Spell Server to the Trunk. The URL can be configured using only one config parameter and there's another parameter to specify the languages that are available for spell checking.
I don't have aspell installed to test it, so please can somebody confirm if my changes really work...
Regards, Thomas
Jim Pingle wrote:
I managed to get this up and running and working with Roundcube rather easily. I did have to make a couple slight changes in the code to make it configurable (and default to using Google).
Apply the attached patch to program/steps/mail/spell.inc and then add these config variables in config/main.inc.php:
$rcmail_config['googiespell_server'] = "127.0.0.1"; $rcmail_config['googiespell_port'] = "14003"; $rcmail_config['googiespell_path'] = "/?lang=";
Start your nox server, and away it goes...
Note: I had to edit nox's run_server.py and tell it not to use Google there, too.
Jim
If you are looking for a way to do it, you can follow this example I created a while back.
http://www.greasydaemon.com/macosx/macfirewall/
Brennan
On Mon, 21 Aug 2006 22:31:14 -0600, Eric Stadtherr estadtherr@gmail.com wrote:
Has anyone written a LaunchServices property file yet to automatically start the Nox server on Mac OS X?
Thomas Bruederli wrote:
Hi,
I just added support for Nox Spell Server to the Trunk. The URL can be configured using only one config parameter and there's another parameter to specify the languages that are available for spell checking.
I don't have aspell installed to test it, so please can somebody confirm if my changes really work...
Regards, Thomas
Jim Pingle wrote:
I managed to get this up and running and working with Roundcube rather easily. I did have to make a couple slight changes in the code to make
it
configurable (and default to using Google).
Apply the attached patch to program/steps/mail/spell.inc and then add
these
config variables in config/main.inc.php:
$rcmail_config['googiespell_server'] = "127.0.0.1"; $rcmail_config['googiespell_port'] = "14003"; $rcmail_config['googiespell_path'] = "/?lang=";
Start your nox server, and away it goes...
Note: I had to edit nox's run_server.py and tell it not to use Google
there,
too.
Jim
-- Brennan Stehling Offwhite.net LLC brennan@offwhite.net