} $debug = $tm->debug; break; case 'ngram': require_once 'classes/class.taxamatch.php'; $tm = new Taxamatch(); $data = $tm->ngram($str, $str2); if ($output == 'xml') { $data = $tm->getXML(); } $debug = $tm->debug; break; case 'mdld': require_once 'classes/class.damerau_levenshtein_mod.php'; $mdld = new DamerauLevenshteinMod(); $data = $mdld->mdld_php($str, $str2, 10, 1); break; case 'taxamatch': require_once 'classes/class.taxamatch.php'; if ($cache) { $output = 'rest'; } $db = select_source($source, $classification); $data = array(); $names = preg_split("/[\r\n;]+/", $str); if (is_array($names)) { foreach ($names as $name) { $tm = new Taxamatch($db); $tm->set('debug_flag', $debug); $tm->set('output_type', strtolower($output)); $tm->set('cache_flag', $authorities[$source]['cache_flag']);