ISpell Issues
am 22.01.2006 22:54:28 von Shandyman
Hi --
I've installed Lingua::ISpell using the ppm from ActivePerl.
I have ISpell.pm sitting on my machine in the F:\perl\site\lib\lingua
directory.
I've tried running a couple of scripts (see below) and I keep getting a
"The system cannot find the path specified" error.
My @INC contains F:/Perl/lib and F:Perl/site/lib.
Do I need to build something, or is there a problem with my path?
Any help would be greatly appreciated.
Thanks.
************************************************************ ******************************
Script 1:
#!/usr/local/bin/perl
package Lingua::Ispell;
use Exporter;
@Lingua::Ispell::ISA = qw(Exporter);
@Lingua::Ispell::EXPORT_OK = qw(
spellcheck
add_word
add_word_lc
accept_word
parse_according_to
set_params_by_language
save_dictionary
allow_compounds
make_wild_guesses
use_dictionary
use_personal_dictionary
);
%Lingua::Ispell::EXPORT_TAGS = (
'all' => \@Lingua::Ispell::EXPORT_OK,
);
use FileHandle;
use IPC::Open2;
use Carp;
use strict;
use vars qw( $VERSION );
$VERSION = '0.07';
use Lingua::Ispell qw( :all ); # import all symbols
for my $r ( spellcheck( "hello hacking perl shrdlu 42" ) ) {
print "$r->{'type'}: $r->{'term'}\n";
}
Script #2
#!/usr/local/bin/perl
my $string;
$string = "Thun os a tist";
use lib 'F:/Perl/site/lib/lingua';
use Lingua::Ispell;
Lingua::Ispell::spellcheck( $string );
Re: ISpell Issues
am 23.01.2006 07:14:31 von Sisyphus
"Shandyman" wrote in message
news:1137966868.665991.7110@g44g2000cwa.googlegroups.com...
> Hi --
>
> I've installed Lingua::ISpell using the ppm from ActivePerl.
You mean Lingua::Ispell ? Be careful that you get the case right.
>
> I have ISpell.pm sitting on my machine in the F:\perl\site\lib\lingua
> directory.
>
That looks right for the @INC reported below.
>
> My @INC contains F:/Perl/lib and F:Perl/site/lib.
>
I think you get that message because the ispell executable cannot be found
in the location specified by $Lingua::Ispell::path. Here is the relevant
section from the pod documentation:
"Nota Bene
The full location of the ispell executable is stored in the variable
$Lingua::Ispell::path. The default value is /usr/local/bin/ispell. If your
ispell executable has some name other than this, then you must set
$Lingua::Ispell::path accordingly before you call
"Lingua::Ispell::spellcheck()" (or any other function in the module) for the
first time!"
Do you have the ispell executable installed ?
Cheers,
Rob
Re: ISpell Issues
am 23.01.2006 16:47:26 von Shandyman
Rob --
Thank you very much for responding.
I don't have the ispell executable installed.
Offhand, the installation process looks a little more involved than I
think I can handle right now. I'm a Windows user and I don't have any
Unix experience. The relevant Read Me seems to call for a number of
utilities that I'm unfamiliar with.
Oh, well.
Thanks again for your help.
Re: ISpell Issues
am 23.01.2006 16:47:32 von Shandyman
Rob --
Thank you very much for responding.
I don't have the ispell executable installed.
Offhand, the installation process looks a little more involved than I
think I can handle right now. I'm a Windows user and I don't have any
Unix experience. The relevant Read Me seems to call for a number of
utilities that I'm unfamiliar with.
Oh, well.
Thanks again for your help.
Re: ISpell Issues
am 24.01.2006 01:04:20 von unknown
Shandyman wrote:
> Rob --
>
> Thank you very much for responding.
>
> I don't have the ispell executable installed.
>
> Offhand, the installation process looks a little more involved than I
> think I can handle right now. I'm a Windows user and I don't have any
> Unix experience. The relevant Read Me seems to call for a number of
> utilities that I'm unfamiliar with.
There are a number of ways to get Perl modules properly installed. The
"readme" typically gives the lowest common denominator:
gunzip module.tar.gz
tar -xf module.tar
cd module
make
make test
make install
You can get 'nmake' from Microsoft, and WinZIP will handle gzipped tar
files. But Microsoft Visual C++ ain't cheap (especially compared to
gcc), so a lot of Wintel users don't have it. This means you can't
install Perl modules that have "C" callouts.
ActivePerl gets around this by, in essence, running all the steps for
you except the last, and then packaging the results for download and
installation via their PPM program. If you're using ActivePerl, this is
the way to go, because of Windows' reluctance to let you replace an
in-use DLL.
The bottom line of all this verbiage is that you may not need to do
anything but find and install a Windows version of ispell, and point the
Perl module at it.
Tom Wyant
Re: ISpell Issues
am 24.01.2006 05:50:13 von Shandyman
Tom --
Thank you for responding.
So far at least I haven't been able to find a simple Windows binary of
ispell.
It does look like I can get my hands on a Windows binary of aspell, so
I may try that.
All I'm interested in is flagging the misspelled words -- not
suggesting any changes, etc. -- so I'm hoping this will be sufficient.
Thanks again for your help.
Re: ISpell Issues
am 24.01.2006 08:40:06 von Sisyphus
"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net">
wrote in message
>
> You can get 'nmake' from Microsoft, and WinZIP will handle gzipped tar
> files. But Microsoft Visual C++ ain't cheap (especially compared to
> gcc), so a lot of Wintel users don't have it. This means you can't
> install Perl modules that have "C" callouts.
>
The situation on this front has improved lately. As of (the latest) build
815, the freely available MinGW (gcc) compiler works seamlessly with
ActivePerl.
Cheers,
Rob
Re: ISpell Issues
am 24.01.2006 14:16:52 von unknown
Sisyphus wrote:
> "harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net">
> wrote in message
>
>
>>You can get 'nmake' from Microsoft, and WinZIP will handle gzipped tar
>>files. But Microsoft Visual C++ ain't cheap (especially compared to
>>gcc), so a lot of Wintel users don't have it. This means you can't
>>install Perl modules that have "C" callouts.
>>
>
>
> The situation on this front has improved lately. As of (the latest) build
> 815, the freely available MinGW (gcc) compiler works seamlessly with
> ActivePerl.
>
> Cheers,
> Rob
>
>
Thanks. That's a development I've missed.
Tom
Re: ISpell Issues
am 24.01.2006 23:40:56 von Shandyman
I have Aspell up and running on my machine.
Thanks all for your help.