示例#1
0
 public function testFalsePositiveNormalizedInNegative()
 {
     Word::$falsePositiveNormalizedList = array('блядь');
     Word::$falseNegativeList = array('бляди');
     $this->assertFalse(Word::stemm('блядь')->isBadWord());
     $this->assertFalse(Word::stemm('блядей')->isBadWord());
     $this->assertTrue(Word::stemm('бляди')->isBadWord());
 }
示例#2
0
 public function testNoVariantsWord()
 {
     $word = Word::stemm('ololo');
     $this->assertFalse($word->checkGrammeme(MystemConst::DATIVE));
     $this->assertNull($word->getNounCase(1));
 }
示例#3
0
<?php

require __DIR__ . '/../vendor/autoload.php';
$verbs = array('шедший', 'идущий', 'вычислявшийся', 'вычисляющийся');
foreach ($verbs as $word) {
    echo $word . " - " . \Mystem\Word::stemm($word)->getVerbTime() . "\n";
}