I dug out a PHP version of Porters Algorithm from
:-http://www.tartarus.or g/~martin/PorterStemmer/php.txt
Whenever I try and run it I'm getting the error
"Wrong parameter count for join() "
Can anyone guess what I am doing wrong, I haven't modified the class
so I assume its the way I'm calling it.
Richard
************* code to call class *************** ******
<?php
require("stemmi ng.inc");
$string="compuT ing";
$string=strtolo wer($string);
echo $string;
$stm=new stemming();
$stm->reset();
for($i=0;$i<str len($string);$i ++)
$stm->add(substr($st ring,$i,1));
$stm->stem(0);
$stem = $stm->toString(); //stem of the string
echo $stem;
?>
*************** *** end code*********** *************** *
:-http://www.tartarus.or g/~martin/PorterStemmer/php.txt
Whenever I try and run it I'm getting the error
"Wrong parameter count for join() "
Can anyone guess what I am doing wrong, I haven't modified the class
so I assume its the way I'm calling it.
Richard
************* code to call class *************** ******
<?php
require("stemmi ng.inc");
$string="compuT ing";
$string=strtolo wer($string);
echo $string;
$stm=new stemming();
$stm->reset();
for($i=0;$i<str len($string);$i ++)
$stm->add(substr($st ring,$i,1));
$stm->stem(0);
$stem = $stm->toString(); //stem of the string
echo $stem;
?>
*************** *** end code*********** *************** *
Comment