Stemmer/tests/StemmerTest.php

23 lines
552 B
PHP
Raw Normal View History

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
{
public function testStemming()
{
$stemmer = new Stemmer();
2016-12-03 16:02:02 +03:00
$testWords = require("dict.php");
2013-11-27 04:06:49 +04:00
foreach ($testWords as $word => $base) {
$this->assertEquals($base, $stemmer->getWordBase($word));
}
}
}