protected function loadPoses(phpMorphy_Dict_Source_Normalized_Ancodes $source, $context, $dictId) { $stmt = $this->engine->prepareInsert('poses', array('dict_id', 'pos', 'is_predict')); $map = $context->getPartOfSpeechMap(); foreach ($source->getPoses() as $pos) { $stmt->execute(array($dictId, $this->trim($pos->getName(), 16), $pos->isPredict() ? 1 : 0)); $map->register($pos->getId(), $this->engine->getLastInsertId('poses')); } }