function getAccents() { // HACK: all lemmas points to accent model with 0 index and length = 4096 $accent_model = new phpMorphy_Dict_AccentModel(0); $accent_model->import(new ArrayIterator(array_fill(0, 4096, null))); return new ArrayIterator(array(0 => $accent_model)); }
protected function processLine($line) { if (substr($line, -1, 1) == ';') { $line = substr($line, 0, -1); } $result = new phpMorphy_Dict_AccentModel($this->getPosition()); $result->import(new ArrayIterator(array_map(array($this, 'processAccentValue'), explode(';', $line)))); return $result; }