/** * @param phpMorphy_Fsa_FsaInterface $fsa * @param phpMorphy_Helper $helper */ function __construct(phpMorphy_Fsa_FsaInterface $fsa, phpMorphy_Helper $helper) { $this->fsa = $fsa; $this->root_trans = $fsa->getRootTrans(); $this->helper = clone $helper; $this->helper->setAnnotDecoder($this->createAnnotDecoder($helper)); $this->graminfo = $helper->getGramInfo(); }
/** * @param phpMorphy_Fsa_FsaInterface $fsa */ function __construct(phpMorphy_Fsa_FsaInterface $fsa) { $this->fsa = $fsa; $this->root = $fsa->getRootTrans(); }
/** * Unpack transition from binary form to array * * @param string|string[] $rawTranses may be array for convert more than one transitions * @return array */ public function unpackTranses($rawTranses) { $result = $this->object->unpackTranses($rawTranses); return $result === $this->object ? $this : $result; }
function phpMorphy_Fsa_State(phpMorphy_Fsa_FsaInterface $fsa, $index) { $this->fsa = $fsa; $this->raw_transes = $fsa->readState($index); $this->transes = $fsa->unpackTranses($this->raw_transes); }