faithless1
asked on
pspell
Hello,
I'm having a difficult time running this script to remove any words not recognized.
The error I get is: Fatal error: call to undefined function pspell_new() in /home/directory/pspell.php on line 2.
Thank you
<?php
$pspell_link = pspell_new("en");
$lines=file('file.txt');
foreach ($lines as $line)
{
$words=preg_split('/[ \s]+/',trim($line));
foreach ($words as $word)
{
if(pspell_check($pspell_li nk,$word))
{
echo $word,' ';
}
}
echo "\n";
}
?>
I'm having a difficult time running this script to remove any words not recognized.
The error I get is: Fatal error: call to undefined function pspell_new() in /home/directory/pspell.php
Thank you
<?php
$pspell_link = pspell_new("en");
$lines=file('file.txt');
foreach ($lines as $line)
{
$words=preg_split('/[ \s]+/',trim($line));
foreach ($words as $word)
{
if(pspell_check($pspell_li
{
echo $word,' ';
}
}
echo "\n";
}
?>
Fatal error: call to undefined function -- that is pretty unambiguous. Maybe you want new Pspell() instead? You do not have a function named pspell in the script and that is why there is an error message.
You are calling a function which is not defined. If you have created function in a separate page then include it to this current page to call the function pspell_new("en")
I read the following on php.net
ook.pspell .php
Perhaps pspell is no longer supported by your hosting company?
As of php 5.3. Pspell is no longer supported/bundled. Instead you can use the enchant which is bundled by default in 5.3.http://php.net/manual/en/b
Perhaps pspell is no longer supported by your hosting company?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I wanted to clarify... I'm trying to run this script through the gnome terminal in Ubuntu... I'm not using a server for this and this is not a hosted version. Thank you