/** * @param phpMorphy_WordForm_WordFormInterface $wordForm * @return phpMorphy_WordForm_WordForm */ function assignFromWordForm(phpMorphy_WordForm_WordFormInterface $wordForm) { $this->common_prefix = $wordForm->getCommonPrefix(); $this->form_prefix = $wordForm->getFormPrefix(); $this->base = $wordForm->getBase(); $this->suffix = $wordForm->getSuffix(); $this->part_of_speech = $wordForm->getPartOfSpeech(); $this->grammems = array_merge($wordForm->getCommonGrammems(), $wordForm->getFormGrammems()); $this->common_grammems_count = count($wordForm->getCommonGrammems()); return $this; }