protected function createAncode(phpMorphy_Dict_Ancode $ancode) { return new phpMorphy_Dict_Ancode_Normalized($this->registerAncodeId($ancode->getId()), $ancode->getId(), $this->registerPos($ancode->getPartOfSpeech(), $ancode->isPredict()), $this->registerGrammems($ancode->getGrammems()), $ancode->getId()); }
/** * @param phpMorphy_Dict_Ancode $ancode * @return string */ function formatAncode(phpMorphy_Dict_Ancode $ancode) { return $this->formatSimpleModel('Ancode', array('id' => $ancode->getId(), 'part_of_speech' => $ancode->getPartOfSpeech(), 'grammems' => implode(', ', $ancode->getGrammems()))); }
function insert(phpMorphy_Dict_Ancode $ancode) { $pos_id = $this->insertPos($ancode->getPartOfSpeech(), $ancode->isPredict()); $grammems_ids = $this->insertGrammems($ancode->getGrammems()); $this->ancodes_map[$ancode->getId()] = array('pos_id' => $pos_id, 'grammems_ids' => $grammems_ids); }