예제 #1
0
 function __construct(phpMorphy_Storage $ancodesMap)
 {
     if (false === ($this->ancodes_map = unserialize($ancodesMap->read(0, $ancodesMap->getFileSize())))) {
         throw new phpMorphy_Exception("Can`t open phpMorphy => Dialing ancodes map");
     }
     $this->reverse_map = array_flip($this->ancodes_map);
 }
예제 #2
0
파일: gramtab.php 프로젝트: umaxfun/x4m
 protected function __construct(phpMorphy_Storage $storage)
 {
     $this->data = unserialize($storage->read(0, $storage->getFileSize()));
     if (false === $this->data) {
         throw new phpMorphy_Exception("Broken gramtab data");
     }
     $this->grammems = $this->data['grammems'];
     $this->poses = $this->data['poses'];
     $this->ancodes = $this->data['ancodes'];
 }