PHP code example of wamania / php-stemmer
1. Go to this page and download the library: Download wamania/php-stemmer library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wamania / php-stemmer example snippets
use Wamania\Snowball\StemmerFactory;
// use ISO_639 (2 or 3 letters) or language name in english
$stemmer = StemmerFactory::create('fr');
$stemmer = StemmerFactory::create ('spanish');
// then
$stem = $stemmer->stem('automóvil');
use Wamania\Snowball\StemmerManager;
$manager = new StemmerManager();
$stem = $manager->stem('automóvil', 'es');
use Wamania\Snowball\French;
$stemmer = new French();
$stem = $stemmer->stem('anticonstitutionnellement');
composer
composer
composer