$models = Model::loadAll(); $tempModel = Model::loadTemporary(); foreach ($models as $model) { if ($model->modelType != 'MF' && $model->modelType != 'VT' && $model->id != $tempModel->id && $model->id == 130) { print "Testing model " . $model->getName() . " (id = " . $model->id . ")\n"; $lexems = Lexem::loadByModelId($model->id); $transfMap = array(); foreach ($lexems as $lexem) { if (array_key_exists($lexem->id, $knownBadLexems)) { print " Skipping known bad lexem " . $lexem->id . " (" . $lexem->unaccented . ")\n"; continue; } if (!$lexem->isLoc) { continue; } $wls = WordList::loadByLexemId($lexem->id); $ignore = false; for ($i = 0; $i < count($wls) && !$ignore; $i++) { $ignore = ord($wls[$i]->form) == 0 || text_contains($wls[$i]->form, "'"); } if ($ignore) { print " Ignoring lexem " . $lexem->id . " (" . $lexem->unaccented . "): paradigm contains accents or null characters\n"; } if (!$ignore) { if (!count($transfMap)) { // Create model_descriptions by comparing the first lexem to its // existing wordlists. print " Using lexem '" . $lexem->unaccented . "' as exponent\n"; foreach ($wls as $wl) { $transforms = text_extractTransforms($lexem->unaccented, $wl->form); $transfMap[$wl->inflectionId] = $transforms;