} $lname = addslashes(AdminStringUtil::formatLexem($lname)); $names = preg_split("/[-\\s,\\/()]+/", $lname); foreach ($names as $name) { if ($name == '') { continue; } if (isset($excludeChar) && $name[0] == $excludeChar) { continue; } $name = str_replace("'", '', $name); $name = str_replace("\\", '', $name); if ($verbose) { echo "\t * Process part: '{$name}'\n"; } $lexems = Lexem::get_all_by_form($name); if (!count($lexems)) { $lexems = Lexem::get_all_by_formNoAccent($name); } if ($allowInflected) { if (!count($lexems)) { $lexems = Model::factory('Lexem')->table_alias('l')->select('l.*')->join('LexemModel', 'l.id = lm.lexemId', 'lm')->join('InflectedForm', 'l.id = i.lexemModelId', 'i')->where('i.formNoAccent', $name)->find_many(); if (count($lexems)) { if ($verbose) { echo "\t\tFound inflected form {$name} for lexem {$lexems[0]->id} ({$lexems[0]->form})\n"; } } } } // procedura de refolosire a lexemului sau de regenerare if (count($lexems)) {