/** * @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(); }
/** * Return root transition of fsa * @return int */ public function getRootTrans() { $result = $this->object->getRootTrans(); return $result === $this->object ? $this : $result; }
/** * @param phpMorphy_Fsa_FsaInterface $fsa */ function __construct(phpMorphy_Fsa_FsaInterface $fsa) { $this->fsa = $fsa; $this->root = $fsa->getRootTrans(); }