Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-28 Thread Thijs Kinkhorst
On Thu, 2007-02-01 at 22:23 +0100, Rafael Laboissiere wrote:
 * Agustin Martin [EMAIL PROTECTED] [2007-02-01 11:06]:
 
  Thijs, did you try my last patch (using ispell-wrapper) to
  plugins/squirrelspell/sqspell_config.php? If working I am more in favour of
  something like that since it would require no changes in
  dictionaries-common. 
 
 I thought that Thijs was trying to avoid the extra call to a Perl script
 from PHP.  Anyway, I agree that a solution that does not require changes in
 dictionaries-common is better. 

Indeed - my concern is that because a web application is in principle
stateless, I would need to fork a perl call on every page load of the
spell checker, which seems a bit overkill to me.

I could try to cache the result into the user's session though, if you
prefer that. However, since dictionaries-common already seems to be
supplying data for specific applications, what's the drawback of doing
that for one extra specific application?


Thijs



signature.asc
Description: This is a digitally signed message part


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-28 Thread Rafael Laboissiere
* Thijs Kinkhorst [EMAIL PROTECTED] [2007-02-28 11:13]:

 However, since dictionaries-common already seems to be supplying data for
 specific applications, what's the drawback of doing that for one extra
 specific application?

FYI, Agustín have already checked in my changes for including squirrelmail
support into dictionaries-common [1] [2].  This is targeted post-etch.

[1] 
http://alioth.debian.org/plugins/scmcvs/cvsweb.php/dictionaries-common/scripts/Debian/DictionariesCommon.pm.in?cvsroot=dict-common
[2] 
http://alioth.debian.org/plugins/scmcvs/cvsweb.php/dictionaries-common/scripts/system/update-default.in?cvsroot=dict-common

-- 
Rafael



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-28 Thread Agustin Martin
retitle  408116 dictionaries-common: Please add full squirrellspell support
severity 408116 wishlist
thanks

On Wed, Feb 28, 2007 at 11:13:15AM +0100, Thijs Kinkhorst wrote:
 Indeed - my concern is that because a web application is in principle
 stateless, I would need to fork a perl call on every page load of the
 spell checker, which seems a bit overkill to me.

But since ispell is not a shared lib, you will need anyway to have ispell
fully loaded for each page being checked, which is probably much heavier
than a very short call to perl for each page.

I admit that putting explicit support into dictionaries-common is lighter,
and that is what will be for lenny, but I do not think this kind of changes
in dictionaries-commmon have a chance of being accepted for etch. So I
proposed a hack that I thought might have a remote chance of being accepted
for etch, involving only squirrellmail. However I do not think there is
time now for an extensive check of it.

 I could try to cache the result into the user's session though, if you
 prefer that. However, since dictionaries-common already seems to be
 supplying data for specific applications, what's the drawback of doing
 that for one extra specific application?

There is no problem with that, and is already committed to the 'will go to
lenny' branch (ooo-lenny for historical reasons, was initally thought for
the ooo-hunspell transition experiments). So squirrelspell full support
will go into lenny, but not into etch. There are also some other things
that 'ispell-wrapper' does and that are needed for a good call to the
spellchecker. I will put also that functionality into the code, so
spellchecking is complete.

In the meantime I am renaming this bug report and marking it as wishlist.

There are more things that are pending of feedback since sarge, should the
dictionary list be stripped? I do not think the tex variants have a meaning
for squirrelspell.

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-07 Thread Rafael Laboissiere
* Agustin Martin [EMAIL PROTECTED] [2007-02-06 13:39]:

 Another reason for considering (at least temporarily) a squirrelmail only
 fix is that, if etch stays delayed and the fix is extensively tested before
 uploading, it has a chance of being accepted into etch, of course asking
 debian-release before actually uploading.

This sounds like a wise decision and I agree with it.  However, please
consider adding SquirrelMail support to dictionaries-common in the future
(post-etch), in a form like the one that I suggested before in this thread.

-- 
Rafael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-06 Thread Agustin Martin
On Thu, Feb 01, 2007 at 10:23:28PM +0100, Rafael Laboissiere wrote:
 * Agustin Martin [EMAIL PROTECTED] [2007-02-01 11:06]:
 
  Thijs, did you try my last patch (using ispell-wrapper) to
  plugins/squirrelspell/sqspell_config.php? If working I am more in favour of
  something like that since it would require no changes in
  dictionaries-common. 
 
 I thought that Thijs was trying to avoid the extra call to a Perl script
 from PHP.  Anyway, I agree that a solution that does not require changes in
 dictionaries-common is better.

There should be very litle extra load due to ispell-wrapper. It finishes early
leaving the real ispell process running with the appropriate parameters.

Another reason for considering (at least temporarily) a squirrelmail only
fix is that, if etch stays delayed and the fix is extensively tested before
uploading, it has a chance of being accepted into etch, of course asking
debian-release before actually uploading.

However, I have noticed a problem in my original patch because it used the
original regexp and it would only match language entries where the
non-english part is a single word. I am attaching a patch with a different
regexp, tested in perl (again, nothing is tested in PHP). I have also
modified it to use as tag to be displayed the full language name, as in
your patch.

The only problem I see in the proposed change (apart from making sure it is
real PHP) is that if more than one ispell dict have the same english part in
the language field ispell-wrapper will complain. But I do not think that
is happening now and would be anyway better than what we currently have.

-- 
Agustin
diff -Naur squirrelmail-1.4.9a.thijs/plugins/squirrelspell/sqspell_config.php 
squirrelmail-1.4.9a/plugins/squirrelspell/sqspell_config.php
--- squirrelmail-1.4.9a.thijs/plugins/squirrelspell/sqspell_config.php  
2007-01-31 17:46:14.0 +0100
+++ squirrelmail-1.4.9a/plugins/squirrelspell/sqspell_config.php
2007-02-06 13:32:31.0 +0100
@@ -27,21 +27,21 @@
  * 'Spanish' = 'aspell -d spanish -a' );
  */
 
-# Debian: if dictionaries-common = 2.50 is available, detect the
+# Debian: if dictionaries-common = 0.22.50 is available, detect the
 # installed dictionaries automatically.
 if ( is_readable ( '/var/cache/dictionaries-common/ispell-dicts-list.txt' ) ) {
 $dicts = file( '/var/cache/dictionaries-common/ispell-dicts-list.txt' );
 $SQSPELL_APP = array();
 foreach ($dicts as $dict) {
-preg_match('/(\S+)\s+\((.+)\)/', $dict, $dparts);
-$SQSPELL_APP[$dparts[2]] = 'ispell -d ' . $dparts[1] . ' -a';
+preg_match('/(.*[^\s]+)\s*\((.+)\)/', $dict, $dparts);
+$SQSPELL_APP[$dict] = 'ispell-wrapper --language=' . $dparts[2] . ' 
-a';
 }
 } else {
 $SQSPELL_APP = array('English' = 'ispell -a',
  'Spanish' = 'ispell -d spanish -a');
 }
 
-# Debian: if dictionaries-common = 2.50 is available, detect the
+# Debian: if dictionaries-common = 0.22.50 is available, detect the
 # default dictionary automatically.
 if ( is_readable ( '/etc/dictionaries-common/ispell-default' ) ) {
 $dictdefault = file ( '/etc/dictionaries-common/ispell-default' );


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-01 Thread Rafael Laboissiere
* Thijs Kinkhorst [EMAIL PROTECTED] [2007-02-01 00:45]:

 I really like this solution, and it doesn't look complex. Great work!

Please, tell me if the sqspell.php file that I attached to my last message
really suits the needs ofr your SquirrelMail pacakge.  If the other
dict-common developers do not disagree, I will commit the changes.

-- 
Rafael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-01 Thread Agustin Martin
On Thu, Feb 01, 2007 at 09:31:04AM +0100, Rafael Laboissiere wrote:
 * Thijs Kinkhorst [EMAIL PROTECTED] [2007-02-01 00:45]:
 
  I really like this solution, and it doesn't look complex. Great work!
 
 Please, tell me if the sqspell.php file that I attached to my last message
 really suits the needs ofr your SquirrelMail pacakge.  If the other
 dict-common developers do not disagree, I will commit the changes.

But just using 'ispell -a -d' will miss some possibly important things,
here is what ispell-wraper calls for spanish,

ispell -w ñáàéèíìóòúùüÑÁÀÉÈÍÌÓÒÚÙÜ -T latin1 -B -d castellano zz.data

The -w part is redundant here (although for other languages might not be
redundant) as well as  the -T part [although it was not originally, since
castellano default encoding was tex-shorthand ('a - á), something I
changed some time ago], which again might not be redundant for other dicts.
-B is OK here.

Thijs, did you try my last patch (using ispell-wrapper) to
plugins/squirrelspell/sqspell_config.php? If working I am more in favour of
something like that since it would require no changes in
dictionaries-common. 

-- 
Agustin



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-02-01 Thread Rafael Laboissiere
* Agustin Martin [EMAIL PROTECTED] [2007-02-01 11:06]:

 Thijs, did you try my last patch (using ispell-wrapper) to
 plugins/squirrelspell/sqspell_config.php? If working I am more in favour of
 something like that since it would require no changes in
 dictionaries-common. 

I thought that Thijs was trying to avoid the extra call to a Perl script
from PHP.  Anyway, I agree that a solution that does not require changes in
dictionaries-common is better.
 
-- 
Rafael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-31 Thread Rafael Laboissiere
* Rafael Laboissiere [EMAIL PROTECTED] [2007-01-27 00:42]:

 One possible solution is to introduce squirrelspell support into
 dictionaries-common. [snip]

Okay, I gave it a try.  Agustín, you will find below a patch to the current
CVS sources that introduce SquirrelMail support in dictionaries-common.  The
idea is to generate a PHP file (/sid/var/cache/dictionaries-common/sqspell.php)
that can be sourced during SquirrelMail initialization.  The file currently
generated in my system is attached below.

You will notice that the generated PHP hash array is like this:

$SQSPELL_APP = array (
  'portugues brasileiro (Brazilian Portuguese)' = 'ispell -d brasileiro -a',
  'francais Hydro-Quebec (French Hydro-Quebec)' = 'ispell -d francais -a',
  'american (American English)' = 'ispell -d american -a'
);

This is different from the current implementation in the squirrelmail
package, in which the hash keys are just the part inside parentheses.  I
think that using the whole language name is better, since it has also the
name in the native language, not only in English.

I do not know much PHP, but the code in sqspell_config.php could be changed
like this:

###
# Debian: if dictionaries-common = 2.?? is available, detect the
# installed dictionaries automatically.
if ( is_readable ( '/var/cache/dictionaries-common/sqspell.php' ) ) {
require_once ( '/var/cache/dictionaries-common/sqspell.php' );
} else {
$SQSPELL_APP = array('English' = 'ispell -a',
 'Spanish' = 'ispell -d spanish -a');
}

# Debian: if dictionaries-common = 2.?? is available, detect the
# default dictionary automatically.
if ( is_readable ( '/etc/dictionaries-common/ispell-default' ) ) {
$dictdefault = file ( '/etc/dictionaries-common/ispell-default' );
$SQSPELL_APP_DEFAULT = $dictdefault[0];
} else {
$SQSPELL_APP_DEFAULT = 'English';
}
###


-- 
Rafael
Index: scripts/Debian/DictionariesCommon.pm.in
===
RCS file: 
/cvsroot/dict-common/dictionaries-common/scripts/Debian/DictionariesCommon.pm.in,v
retrieving revision 1.30
diff -u -r1.30 DictionariesCommon.pm.in
--- scripts/Debian/DictionariesCommon.pm.in 14 Feb 2006 12:46:33 -  
1.30
+++ scripts/Debian/DictionariesCommon.pm.in 31 Jan 2007 13:02:34 -
@@ -9,6 +9,7 @@
getlibdir getsysdefault setsysdefault
getuserdefault setuserdefault
build_emacsen_support build_jed_support
+   build_squirrelmail_support
 build_pspell_support);
 # Import :all to get everything.
 our %EXPORT_TAGS = (all = [EMAIL PROTECTED]);
@@ -20,6 +21,7 @@
 my $userdefault = $ENV{HOME}/.$ispelldefault;
 my $emacsensupport = @EMACSENSUPPORT@;
 my $jedsupport = jed-ispell-dicts.sl;
+my $squirrelmailsupport = sqspell.php;
 
 sub getlibdir {
   my $class = shift;
@@ -347,6 +349,24 @@
   close SLANG;
 }
 
+sub build_squirrelmail_support {
+
+  my $dictionaries = loaddb (ispell);
+  my $php = generate_comment (### );
+
+  $php .= qq {?php\n\$SQSPELL_APP = array (\n  }
+. join (,\n  , map {
+  my $hashname = $dictionaries-{$_}-{hash-name};
+  qq {'$_' = 'ispell -d $hashname -a'};
+} keys %$dictionaries)
+. qq {\n);\n?\n};
+
+  open (PHP,  $cachedir/$squirrelmailsupport)
+or die Cannot open SquirrelMail cache file;
+  print PHP $php;
+  close PHP;
+}
+
 # Ensure we evaluate to true.
 1;
 
Index: scripts/system/update-default.in
===
RCS file: 
/cvsroot/dict-common/dictionaries-common/scripts/system/update-default.in,v
retrieving revision 1.35
diff -u -r1.35 update-default.in
--- scripts/system/update-default.in25 Aug 2005 16:29:29 -  1.35
+++ scripts/system/update-default.in31 Jan 2007 13:02:34 -
@@ -133,6 +133,7 @@
   #[W: (nothing to do for wordlists):][I: Ispell emacsen + jed support
   build_emacsen_support ();
   build_jed_support ();
+  build_squirrelmail_support ();
   system (ispell-autobuildhash) == 0
   or die Error running ispell-autobuildhash\n;
   # End of specific ispell support :]
@@ -167,7 +168,7 @@
 updates the system-wide setting F/etc/dictionaries-common/ispell-default.:I]
 If option B--rebuild is given, rebuilds the 
 F/var/cache/dictionaries-common/[I:ispell:][W:wordlist:].db [I: 
-and the emacsen and jed support (to be put in
+and the emacsen, jed, and SquirrelMail support (to be put in
 F/var/cache/dictionaries-common/):I] from the files in
 F/var/lib/dictionaries-common/[I:ispell:][W:wordlist:]
 


sqspell.php
Description: application/httpd-php


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-31 Thread Agustin Martin
On Fri, Jan 26, 2007 at 06:31:33PM +0100, Agustin Martin wrote:
 On Fri, Jan 26, 2007 at 01:46:34PM +0100, Thijs Kinkhorst wrote:
  What does the first field in the .txt file mean?
 
 Nothing, there is no first field, each line is a full field by itself.

For clarity, just mention that the line has two parts, the part between
parentheses is the english name for the dict and the part before it is the
name in the dict language (or whatever the maintainer wants to put there,
if there are expected problems with encodings ...)

Both parts can have more that one word and none of the words alone is a
field, and nothing is mandated to match the hash name.

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-31 Thread Agustin Martin
On Wed, Jan 31, 2007 at 03:05:11PM +0100, Rafael Laboissiere wrote:
 * Rafael Laboissiere [EMAIL PROTECTED] [2007-01-27 00:42]:
 
  One possible solution is to introduce squirrelspell support into
  dictionaries-common. [snip]
 
 Okay, I gave it a try.  Agustín, you will find below a patch to the current
 CVS sources that introduce SquirrelMail support in dictionaries-common.  The
 idea is to generate a PHP file 
 (/sid/var/cache/dictionaries-common/sqspell.php)
 that can be sourced during SquirrelMail initialization.  The file currently
 generated in my system is attached below.

Thanks, Rafael.

Since we are this close to etch release and these changes will not go into
etch, I would wait a bit before committing stuff, so we are sure that this
is what is really wanted.

I still think that it would be better to use plain ispell-wrapper, so other
interesting info is used when spellchecking. I tested it by setting
'ispell-program-name' in emacs to ispell-wrapper and seems to work well, so
I would expect 'ispell-wrapper -a --language=...' to work as well from
squirrelmail. I will make sure that ispell-wrapper internally escapes
parentheses when needed, so everything can be done after the entry names
with small changes to current sqspell code.

Also I guess we need to somewhat strip the list of dicts, e.g., I doubt
that the TeX variants have a meaning in that list for squirrelmail. 

Thijs, ¿what do you think about this?

-- 
Agustin



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-31 Thread Thijs Kinkhorst
Hi Rafael,

On Wed, 2007-01-31 at 15:05 +0100, Rafael Laboissiere wrote:
 Okay, I gave it a try.  Agustín, you will find below a patch to the current
 CVS sources that introduce SquirrelMail support in dictionaries-common.  The
 idea is to generate a PHP file 
 (/sid/var/cache/dictionaries-common/sqspell.php)
 that can be sourced during SquirrelMail initialization.  The file currently
 generated in my system is attached below.

I really like this solution, and it doesn't look complex. Great work!

 This is different from the current implementation in the squirrelmail
 package, in which the hash keys are just the part inside parentheses.  I
 think that using the whole language name is better, since it has also the
 name in the native language, not only in English.

I think that is no problem. I'd have to look into the compatibility
situation with existing settings, but that can be solved in the
SquirrelMail code.


Thanks,
Thijs


signature.asc
Description: This is a digitally signed message part


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-26 Thread Thijs Kinkhorst
Hi Rafael,

On Tue, 2007-01-23 at 19:42 +0100, Rafael Laboissiere wrote:
 The information you are looking for is in
 /var/cache/dictionaries-common/ispell.db.  This file contains Perl code and
 the hash name can be easily extract like this (try the following in bash): 
 
 perl -e '$name = francais Hydro-Quebec (French Hydro-Quebec); \
   do /var/cache/dictionaries-common/ispell.db; \
   print ($dictionaries{$name}-{hash-name}, \n)'

It was suggested to me originally by the dictionaries-common maintainers
that I use the ispell-dicts-list.txt file.

And I'd prefer to continue using it too, because calling perl in a shell
is something I'd like to avoid, since it has the potential of breaking
and the extra forking needed on squirrelspell invocation might not be
appreciated by large-scalle installs.

What does the first field in the .txt file mean?


Thijs




signature.asc
Description: This is a digitally signed message part


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-26 Thread Agustin Martin
On Fri, Jan 26, 2007 at 01:46:34PM +0100, Thijs Kinkhorst wrote:
 Hi Rafael,
 
 On Tue, 2007-01-23 at 19:42 +0100, Rafael Laboissiere wrote:
  The information you are looking for is in
  /var/cache/dictionaries-common/ispell.db.  This file contains Perl code and
  the hash name can be easily extract like this (try the following in bash): 
  
  perl -e '$name = francais Hydro-Quebec (French Hydro-Quebec); \
do /var/cache/dictionaries-common/ispell.db; \
print ($dictionaries{$name}-{hash-name}, \n)'
 
 It was suggested to me originally by the dictionaries-common maintainers
 that I use the ispell-dicts-list.txt file.

Those are Rafael and me. IIRC that file contains exactly what was asked for,
the identifiers for each dict in the same format as ispell-default, I do not
remember any of us suggested that any part of that entries directly provide
the hash name. I am afraid there was a misunderstanding here.

 And I'd prefer to continue using it too, because calling perl in a shell
 is something I'd like to avoid, since it has the potential of breaking
 and the extra forking needed on squirrelspell invocation might not be
 appreciated by large-scalle installs.

There were no changes in this code since just before sarge was released. So,
I am surprised that nobody has complained about this before. I have tried
using ispell-wrapper directly under emacs and the double pipe works as
expected, so I think is the easiest way to go, after selected spellchecker
using either

aspell -d xx_XX

or

ispell-wrapper --language=the_full_entry_from_ispell-dicts-list.txt

with parenthesis escaped in the_full_entry_from_ispell-dicts-list.txt. I
have been playing with the perl snippet

$entry =~ s/([^\\]|^)(\(|\))/$1\\$2/g;

to do this, only if not previously escaped. I will eventually add this to
ispell-wrapper, but we are too close to lenny (I hope).

While ispell-wrapper is a perl script, it should put little load on your
system, it calls ispell through exec and ends early.

 What does the first field in the .txt file mean?

Nothing, there is no first field, each line is a full field by itself.

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-26 Thread Rafael Laboissiere
* Thijs Kinkhorst [EMAIL PROTECTED] [2007-01-26 13:46]:

 It was suggested to me originally by the dictionaries-common maintainers
 that I use the ispell-dicts-list.txt file.

The name of the hash file is not present in this file.  I am afraid you are
out of hope here...
 
 And I'd prefer to continue using it too, because calling perl in a shell
 is something I'd like to avoid, since it has the potential of breaking
 and the extra forking needed on squirrelspell invocation might not be
 appreciated by large-scalle installs.

One possible solution is to introduce squirrelspell support into
dictionaries-common.  Notice that there is already support for a variety of
applications, like emacs, jed, mutt, and OpenOffice.  Could you tell us what
would be needed for squirelspell?  Let us take the jed support as an
example.  The dicitionaries-common package automatically generates the
contents of file /var/cache/dictionaries-common/jed-ispell-dicts.sl, which
are like this:

%%% This file is part of the dictionaries-common package.
%%% It has been automatically generated.
%%% DO NOT EDIT!

ispell_add_dictionary (
  francais,
  francais,
  ÀÂÇÈÉÊËÎÏÔÙÛÜàâçèéêëîïôùûü,
  [-'],
  ~list,
  );

[...]

Notice that the code above is in S-Lang and can be read by jed at
initialisation time.  I guess squirrelspell can do something similar?

 What does the first field in the .txt file mean?

It is the name of the dictionary in the native language.

-- 
Rafael



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-24 Thread Agustin Martin
On Tue, Jan 23, 2007 at 05:12:25PM +0100, Thijs Kinkhorst wrote:
 Package: dictionaries-common
 Version: 0.70.11
 
 Hi,
 
 The squirrelmail package
 uses /var/cache/dictionaries-common/ispell-dicts-list.txt from
 dictionaries-common to read the available dictionaries for ispell for
 use in the SquirrelMail spell checker.
 
 However, if I install ifrench-gut I get the following contents in that
 file:
 
 american (American English)
 british (British English)
 francais GUTenberg (French GUTenberg)
 francais GUTenberg TeX8b (French GUTenberg TeX8b)
 nederlands (Dutch)
 
 and the following files under /usr/lib/ispell/fr*:
 
 lrwxrwxrwx  1 root root  16 Jan 23 15:03 francais-TeX8b.aff -
 french-TeX8b.aff
 lrwxrwxrwx  1 root root  17 Jan 23 15:03 francais-TeX8b.hash -
 french-TeX8b.hash
 lrwxrwxrwx  1 root root  10 Jan 23 15:03 francais.aff - french.aff
 lrwxrwxrwx  1 root root  11 Jan 23 15:03 francais.hash -
 french.hash
 -rw-r--r--  1 root root   29580 Aug 26  2004 french-TeX8b.aff
 -rw-r--r--  1 root root 2777116 Aug 26  2004 french-TeX8b.hash
 -rw-r--r--  1 root root   29577 Aug 26  2004 french.aff
 -rw-r--r--  1 root root 2777148 Aug 26  2004 french.hash
 lrwxrwxrwx  1 root root  10 Jan 23 15:03 frenchb.aff - french.aff
 lrwxrwxrwx  1 root root  11 Jan 23 15:03 frenchb.hash - french.hash
 
 SquirrelSpell needs to get the right name to pass to ispell -d.
 ispell-dicts-list.txt lists those names for american, british and
 nederlands, but I don't see how I can deduce the right parameter for the
 French dictionary.

Hi, Thijs,

There is no warranty that the first word in that entry matches the hash
name, and never was such warranty.

I think we considered the current ispell-dicts-list.txt format OK in 

http://bugs.debian.org/283948

where you and us discussed how to implement this plain text file.

If the squirrelmail spellchecker plugin uses only ispell, I suggest you to
call ispell-wraper instead, using the long name, see this example

$ echo asdegf | ispell-wrapper -l --language=american \(American English\)
asdegf

Note that you need to escape parenthesis. I expect something like
ispell-wrapper -a --language=... being useful for you (however, never tested
it in a double pipe). Note that using ispell-wrapper will also set some
important things that plain use of -d will not do.

I agree with Rafael that this is not a bug in dictionaries-common, which
just writes its available (and accurate) info in an easy to read form. So,
I plan to close this bug report unless you convince me of the opposite.

-- 
Agustin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-23 Thread Thijs Kinkhorst
Package: dictionaries-common
Version: 0.70.11

Hi,

The squirrelmail package
uses /var/cache/dictionaries-common/ispell-dicts-list.txt from
dictionaries-common to read the available dictionaries for ispell for
use in the SquirrelMail spell checker.

However, if I install ifrench-gut I get the following contents in that
file:

american (American English)
british (British English)
francais GUTenberg (French GUTenberg)
francais GUTenberg TeX8b (French GUTenberg TeX8b)
nederlands (Dutch)

and the following files under /usr/lib/ispell/fr*:

lrwxrwxrwx  1 root root  16 Jan 23 15:03 francais-TeX8b.aff -
french-TeX8b.aff
lrwxrwxrwx  1 root root  17 Jan 23 15:03 francais-TeX8b.hash -
french-TeX8b.hash
lrwxrwxrwx  1 root root  10 Jan 23 15:03 francais.aff - french.aff
lrwxrwxrwx  1 root root  11 Jan 23 15:03 francais.hash -
french.hash
-rw-r--r--  1 root root   29580 Aug 26  2004 french-TeX8b.aff
-rw-r--r--  1 root root 2777116 Aug 26  2004 french-TeX8b.hash
-rw-r--r--  1 root root   29577 Aug 26  2004 french.aff
-rw-r--r--  1 root root 2777148 Aug 26  2004 french.hash
lrwxrwxrwx  1 root root  10 Jan 23 15:03 frenchb.aff - french.aff
lrwxrwxrwx  1 root root  11 Jan 23 15:03 frenchb.hash - french.hash

SquirrelSpell needs to get the right name to pass to ispell -d.
ispell-dicts-list.txt lists those names for american, british and
nederlands, but I don't see how I can deduce the right parameter for the
French dictionary.

I hope it is clear what I mean. If not, please ask :)


Thijs


signature.asc
Description: This is a digitally signed message part


Bug#408116: dictionaries-common: some dictionaries appear incorrectly in /var/cache/dictionaries-common/ispell-dicts-list.txt

2007-01-23 Thread Rafael Laboissiere
* Thijs Kinkhorst [EMAIL PROTECTED] [2007-01-23 17:12]:

 Package: dictionaries-common
 Version: 0.70.11
 
 Hi,
 
 The squirrelmail package
 uses /var/cache/dictionaries-common/ispell-dicts-list.txt from
 dictionaries-common to read the available dictionaries for ispell for
 use in the SquirrelMail spell checker.
 
 However, if I install ifrench-gut I get the following contents in that
 file:
 
 american (American English)
 british (British English)
 francais GUTenberg (French GUTenberg)
 francais GUTenberg TeX8b (French GUTenberg TeX8b)
 nederlands (Dutch)
 
 and the following files under /usr/lib/ispell/fr*:
 
 lrwxrwxrwx  1 root root  16 Jan 23 15:03 francais-TeX8b.aff -
 french-TeX8b.aff
 lrwxrwxrwx  1 root root  17 Jan 23 15:03 francais-TeX8b.hash -
 french-TeX8b.hash
 lrwxrwxrwx  1 root root  10 Jan 23 15:03 francais.aff - french.aff
 lrwxrwxrwx  1 root root  11 Jan 23 15:03 francais.hash -
 french.hash
 -rw-r--r--  1 root root   29580 Aug 26  2004 french-TeX8b.aff
 -rw-r--r--  1 root root 2777116 Aug 26  2004 french-TeX8b.hash
 -rw-r--r--  1 root root   29577 Aug 26  2004 french.aff
 -rw-r--r--  1 root root 2777148 Aug 26  2004 french.hash
 lrwxrwxrwx  1 root root  10 Jan 23 15:03 frenchb.aff - french.aff
 lrwxrwxrwx  1 root root  11 Jan 23 15:03 frenchb.hash - french.hash
 
 SquirrelSpell needs to get the right name to pass to ispell -d.
 ispell-dicts-list.txt lists those names for american, british and
 nederlands, but I don't see how I can deduce the right parameter for the
 French dictionary.

The information you are looking for is in
/var/cache/dictionaries-common/ispell.db.  This file contains Perl code and
the hash name can be easily extract like this (try the following in bash): 

perl -e '$name = francais Hydro-Quebec (French Hydro-Quebec); \
  do /var/cache/dictionaries-common/ispell.db; \
  print ($dictionaries{$name}-{hash-name}, \n)'

At any rate, this is not a bug of the dictionaries-common package and I
would recommend to close this bug report.

-- 
Rafael


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]