2013-11-27 04:06:49 +04:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* This file is part of the RussianStemmer package
|
|
|
|
*
|
|
|
|
* (c) Alexander Kiryukhin
|
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace NXP;
|
|
|
|
|
|
|
|
class StemmerTest extends \PHPUnit_Framework_TestCase
|
|
|
|
{
|
2017-11-07 11:00:49 +03:00
|
|
|
public function testStemmingDataProvider()
|
2013-11-27 04:06:49 +04:00
|
|
|
{
|
2017-11-07 11:00:49 +03:00
|
|
|
return require("dict.php");
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider testStemmingDataProvider
|
|
|
|
*
|
|
|
|
* @param string $word
|
|
|
|
* @param string $expected
|
|
|
|
*/
|
|
|
|
public function testStemming($word, $expected)
|
|
|
|
{
|
|
|
|
$this->assertEquals($expected, Stemmer::getWordBase($word));
|
2013-11-27 04:06:49 +04:00
|
|
|
}
|
|
|
|
}
|