Exemplo n.º 1
0
/**
 * function clean_for_aiml_match()
 * this function controls the calls to other functions to clean text for an aiml match
 * @param string $text
 * @return string text
**/
function clean_for_aiml_match($text)
{
    $otext = $text;
    $text = remove_allpuncutation($text);
    //was not all before
    $text = whitespace_clean($text);
    $text = captialise($text);
    runDebug(__FILE__, __FUNCTION__, __LINE__, "In: {$otext} Out:{$text}", 4);
    return $text;
}
Exemplo n.º 2
0
/**
 * function clean_that()
 * This function cleans the 'that' of html and other bits and bobs
 * @param string $that - the string to clean
 * @return string $that - the cleaned string
**/
function clean_that($that)
{
    $in = $that;
    $that = str_replace("<br/>", ".", $that);
    $that = strip_tags($that);
    $that = remove_allpuncutation($that);
    $that = whitespace_clean($that);
    $that = captialise($that);
    runDebug(__FILE__, __FUNCTION__, __LINE__, "Cleaning the that - that: {$in} cleanthat:{$that}", 4);
    return $that;
}