Hello,
I would like to use this library: https://github.com/wamania/php-stemmer
I have downloaded the repository, changed the composer.json as following (I need it on a very old PHP environment):
{
"name": "wamania/php-stemmer[1.3]",
"description": "Native PHP Stemmer",
"keywords": ["stemmer", "porter", "php"],
"license": "MIT",
"authors": [
{
"name": "Wamania",
"homepage": "http://wamania.com"
}
],
"require": {
"php": ">=5.0",
"voku/portable-utf8": "^5.4"
},
"require-dev":{
"phpunit/phpunit": "^5.0"
},
"autoload": {
"psr-4": {
"Wamania\\Snowball\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Wamania\\Snowball\\Tests\\": "test/"
}
}
}
And then used successfully “composer install” and “composer dump-autoload”. Now, if I create a file tester.php like this:
<?php
require __DIR__ . '/vendor/autoload.php';
use Wamania\Snowball\French;
$stemmer = new French();
$stem = $stemmer->stem('anticonstitutionnellement');
It just says PHP Fatal error: Uncaught Error: Class ‘Wamania\Snowball\French’ not found in /home/me/php-stemmer-master/test.php:7
What am I missing? Thank you