コード例 #1
0
ファイル: taxamatchsoap.php プロジェクト: kyleLesack/TNRS
function normalize($string)
{
    require_once 'classes/class.normalize.php';
    $norm = new Normalize();
    $norm->set('debug_flag', false);
    $data = $norm->normalize($string);
    return $data;
}
コード例 #2
0
ファイル: taxamatch.php プロジェクト: kyleLesack/TNRS
switch ($cmd) {
    case 'normalize':
        require_once 'classes/class.normalize.php';
        $norm = new Normalize();
        $norm->set('debug_flag', $_REQUEST['debug']);
        $data = $norm->normalize($str);
        if ($output == 'xml') {
            $data = $norm->getXML();
        }
        $debug = $norm->debug;
        break;
    case 'normalize_auth':
        require_once 'classes/class.normalize.php';
        $db = select_source($source, $classification);
        $norm = new Normalize($db);
        $norm->set('post_fix', '_' . $source);
        $norm->set('source', $source);
        $data = $norm->normalize_auth($str);
        if ($output == 'xml') {
            $data = $norm->getXML();
        }
        $debug = $norm->debug;
        break;
    case 'treat_word':
        require_once 'classes/class.nearmatch.php';
        $nm = new NearMatch();
        $strip_ending = $strip_ending == '' ? 0 : $strip_ending;
        $normalize = $normalize == '' ? 0 : $normalize;
        $data = $nm->treat_word($str, $strip_ending, $normalize);
        if ($output == 'xml') {
            $data = $nm->getXML();