Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: adding to an ispell dictionary

by CodeJunkie (Monk)
on Apr 15, 2003 at 15:03 UTC ( #250585=note: print w/replies, xml ) Need Help??


in reply to Re: adding to an ispell dictionary
in thread adding to an ispell dictionary

Ok yeah that sounds possible, i've tried running the script you have above but it doesn't add to my personal dictionary.

The code I have is a follows

#!/usr/bin/perl -w use strict; use Lingua::Ispell qw( :all ); # import all symbols use_personal_dictionary('.ispell_english'); add_word_lc("shrdlu"); save_dictionary(); for my $r ( spellcheck( "hello hacking perl shrdlu 42" ) ) { print "$r->{'type'}: $r->{'term'}\n"; }

Unfortunately this does not add to the empty .ispell_english file in my home directory. Even with permissions set to chmod 666 and user: nobody, group: other (i.e. same as web server)

Do I need to set a personal_dictionary variable in my ispell local.h file and re- 'make' the ispell installation?

I hate this sys-admin stuff :-( Appreciate the help though thanks!

Replies are listed 'Best First'.
Re^3: adding to an ispell dictionary
by tall_man (Parson) on Apr 15, 2003 at 15:16 UTC
    What about using an absolute path to the personal dictionary? The user the web browser runs scripts with isn't you (it might be "apache").
      I just did a fresh install of the Lingua::Ispell module, and ran the program that tall_man provided w/out problems.
      Even when I didn't already have .ispell_english created, the program ran, gave me an error (No such file .ipsell_english), created the file, and correctly inserted the word
      Any luck finding an error logged to your apache logs?
      Chris
      Update: Never mind. I didn't see that you had fixed the problem until I increased my 'Notes' depth.

      I wish there was a way I could vote this node 10 times!!! That sorted it :-) Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://250585]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2020-05-31 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?