Exemplo n.º 1
0
 /**
  * @test
  */
 public function it_can_perform_mecab_parseToNode_method()
 {
     $nodes = self::$phpmecab->parseToNode('大丈夫');
     $expected = ['BOS/EOS,*,*,*,*,*,*,*,*', '名詞,形容動詞語幹,*,*,*,*,大丈夫,ダイジョウブ,ダイジョーブ', 'BOS/EOS,*,*,*,*,*,*,*,*'];
     $this->assertNodeResult($nodes, $expected);
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function it_can_get_the_surface()
 {
     $node = self::$phpmecab->parseToNode('眠たいです。');
     $node = $node->getNext();
     $this->assertEquals('眠たい', $node->getSurface());
 }