Zoeken in de kennisbank
Semanta's xbotonderwijs Versie 19.1.31
Contact +31-162-313323
Step 1 Analysis of your utterancePropose discussion partner and subject--->Make a choice
'; echo "
Uw uiting ".$invr_lgrm." and additional choices leads semanta to the following conclusion:
"; echo "
The corpus ".$invr_corp." is asked to talk with you about ".$invr_bzv2." using the chatbot ".$invr_chbt." and the subject ".$invr_domn." Where the beginning of your utterance is leads to ".$invr_begn." en wordt afgesloten met de vraag ".$invr_eind.""; echo "is het waar INVR CORP ".$invr_corp." INVR NAME ".$invr_name." INVR bzv2 ".$invr_bzv2."INVR LGRM ".$invr_lgrm." INVR CHBT ".$invr_chbt." INVR VRAG ".$invr_vrag." INVR DOMN ".$invr_domn." INVR BEGN ".$invr_begn." INVR EIND ".$invr_eind; require_once ("config-smta.php"); require_once ("conv.php"); // require_once ("word-expl-func.php"); // require_once ("letr-expl-func.php"); // require_once ("bwrk-line-func.php"); // require_once ("bepl-taal-func.php"); require_once ("bepl-spec-func.php"); require_once ("bepl-sgmt-func.php"); require_once ("shrt-long-func.php"); // require_once ("wiki-aiml-func.php"); require_once ("xtrt-aiml-func.php"); require_once ("xtrt-xxxx-func.php"); // require_once ("bepl-gram-func.php"); require_once ("tlkd-smts-func.php"); require_once ("smta-tlkd-func-0017.php"); // require_once ("taal-ipcd-func.php");// echo "
Dit toch wel INVR CORP ".$invr_corp." INVR NAME ".$invr_name." INVR bzv1 ".$invr_bzv1."INVR LGRM ".$invr_lgrm." INVR CHBT ".$invr_chbt." INVR VRAG ".$invr_vrag." INVR DOMN ".$invr_domn; ////// ////////////// $sqltref="DELETE FROM `aiml` WHERE NULLIF(template, '') IS NULL or `template` like '%srai>BOTNUMMER ".$bot_id; /////// ////////////////////////////////////////////// // echo "
// ALLE CONVERSATIE //"; $sqltref="SELECT * FROM conversation_log order by `timestamp` desc limit 64 "; mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8"); $trefresult = mysql_query($sqltref, $link); $tref_num = mysql_num_rows($trefresult); // $lr=$tref_num-8; $tref_last=$tref_num-1; // echo "
Display".$display; echo "
Aantallen ".$sqltref." ".$tref_num." AFDRUKKEN ".$lr; echo "
"; if ($tref_num != 0) { $nd=0; // echo ""; while ($row = mysql_fetch_assoc($trefresult)) { $bot_id=$row['bot_id']; $pattern=$row['input']; $template=$row['response']; $datm=$row['timestamp']; if ($template != "Geen direct antwoord" and $template != null and $template != "javascript" and $prelt != $pattern.$template) { // echo ""; $arelt = $pattern."@".$template; $last_ptrn=$pattern; if ($nd < 25 and $prelt!= $pattern.$template) { $prelt=$pattern.$template; $relt_array[$nd]=$arelt; $nd=$nd+1; } } } } // print_r($relt_array); /////////////// /////// // echo "
// Registreer de bezoeker //"; if ($invr_taal == null) { $invr_taal="nederlands"; } // echo "
// wie spreken er met elkaar? //"; if ($invr_chbt == null) { // $invr_vgpt="Prototype"; $invr_chbt="Semantus"; } foreach($relt_array as $relt_key => $relt_val) { // echo "
RELT KEY ".$relt_key." RELT VAL ".$relt_val; } $say=$invr_lgrm; // bepl_calc($say); $calc_dtls=explode(" ",$say); // echo "
REGULAR"; print_r($calc_dtls); foreach($calc_dtls as $calc_key => $calc_val) { if (strlen($calc_val) > 2) { // echo "
CALC FUNC".$calc_val; $calc_rslt=xtrt_xxxx("xdotx".$calc_val,"nederlands","gw27"); // echo "
AANTAL CALC RSLT ".count($calc_rslt); foreach($calc_rslt as $gw27_key => $gw27_val) { // echo "
GW27 KEY ".$gw27_key; $gw27_dtls=explode("!!",$gw27_key); // print_r($gw27_dtls); foreach($gw27_dtls as $itms_key => $itms_val) { $gram_domn=$gw27_dtls[2]; $gram_val=$gw27_dtls[3]; $gram_word=$gw27_dtls[4]; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; if ($gram_val== $calc_val and ($gram_word =="bed" or $gram_word == "merk" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@nummer@ondernemer"]=$text_array[$gram_word."@".$gram_val."@ondernemer@semantus"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="znw" or $gram_word == "mvd" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@nummer@kenner"]=$text_array[$gram_word."@".$gram_val."@kenner@semantus"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="znw" or $gram_word == "plt" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@nummer@politicus"]=$text_array[$gram_word."@".$gram_val."@politicus@semantus"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="nmb" or $gram_word == "gtl" or $gram_word== "ant" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@nummer@semantus"]=$text_array[$gram_word."@".$gram_val."@nummer@semantus"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="nmb" or $gram_word == "gtl" or $gram_word== "ant" or $gram_word == "vlt" or $gram_word== "fnc" or $gram_word== "kpt")) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@geld@geldwinkelier"]=$text_array[$gram_word."@".$gram_val."@geld@winkelier"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="dtm" or $gram_word == "tijd" or $gram_word== "fut" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; $text_array[$gram_word."@".$gram_val."@tijd@semantus"]=$text_array[$gram_word."@".$gram_val."@tijd@semantus"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word =="pts" or $gram_word == "gps" or $gram_word== "land" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@plaats@topograaf"]=$text_array[$gram_word."@".$gram_val."@plaats@topograaf"]+1; // echo "
".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word=="vnm" or $gram_word=="anm" or $gram_word=="msje" or $gram_word=="jngn" or $gram_word=="prs") ) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@persoon@mensenkenner"]=$text_array[$gram_word."@".$gram_val."@persoon@mensenkenner"]+1; // echo "
BRON ".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word=="prs" or $gram_word=="com" or $gram_word=="vds" or $gram_word=="jngn" or $gram_word =="org" or $gram_word=="mens") ) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@persoon@mens"]=$text_array[$gram_word."@".$gram_val."@persoon@mens"]+1; // echo "
BRON ".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word=="gvl" or $gram_word=="emt" or $gram_word=="onz" or $gram_word=="grd" or $gram_word=="znw" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@emotie@mensenkenner"]=$text_array[$gram_word."@".$gram_val."@emotie@mensenkenner"]+1; // echo "
BRON ".$gw27_dtls[3]." ".$gw27_dtls[4]; } if ($gram_val== $calc_val and ($gram_word=="hwd" or $gram_word=="vdw" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; // $text_array[$gram_word."@".$gram_val."@verleden@taalkundige"]=$text_array[$gram_word."@".$gram_val."@verleden@taalkundige"]+1; } if ($gram_val== $calc_val and ($gram_word=="bvn" or $gram_word =="znw" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@kwalificatie@taalkundige"]=$text_array[$gram_word."@".$gram_val."@kwalificatie@taalkundige"]+1; } if ($gram_val== $calc_val and ($gram_word=="bwd" or $gram_word=="xpe" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@activiteit@taalkundige"]=$text_array[$gram_word."@".$gram_val."@activiteit@taalkundige"]+1; } if ($gram_val== $calc_val and ($gram_word=="wsc" or $gram_word=="beta" or $gram_word=="grd" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@karakter@wetenschapper"]=$text_array[$gram_word."@".$gram_val."@karakter@wetenschapper"]+1; } if ($gram_val== $calc_val and ($gram_word=="spt" or $gram_word=="org" or $gram_word=="grd" )) { $word_array[$gram_val]=$word_array[$gram_val]+1; // echo "
ITMS VAL ".$itms_val." GRAM VAL ".$gram_val." GRAM WORD ".$gram_word; $text_array[$gram_word."@".$gram_val."@karakter@sporter"]=$text_array[$gram_word."@".$gram_val."@karakter@sporter"]+1; } } } } } // print_r($text_array); ////////////// // $calc_array=bepl_calc($say); $ssay=str_replace(" ","+",$say); if (count($text_array) > 0) { foreach ($text_array as $calc_key => $calc_val) { // echo "
CALC KEY ".$calc_key." CALC VAL ".$calc_val; $calc_dtls=explode("@",$calc_key); foreach($calc_dtls as $dtls_key => $dtls_val) { $dtls_gram=$calc_dtls[0]; $dtls_word=$calc_dtls[1]; $dtls_kwal=$calc_dtls[2]; $dtls_vgpt=$calc_dtls[3]; if ($dtls_gram != "znw" or $dtls_gram != "mvd") { $gram_rslt=gram_rule($dtls_gram,$dtls_word,"nederlands"); asort($gram_rslt); // print_r($gram_rslt); foreach($gram_rslt as $gram_key => $gram_val ) { // echo "
KEY ".$gram_key." VAL ".$gram_val; $gram_dtls=explode("!!",$gram_val); // print_r($gram_dtls); $vrag_rslt=str_replace("%%",$dtls_word,$gram_dtls[0]); // echo "
".$vrag_rslt; $vrag_array[$vrag_rslt]=$vrag_array[$vrag_rslt]+1; } $gram_array[$dtls_gram]=$gram_array[$dtls_gram]+1; $word_array[$dtls_word]=$word_array[$dtls_word]+1; $kwal_array[$dtls_kwal]=$kwal_array[$dtls_gram]+1; $vgpt_array[$dtls_vgpt]=$vgpt_array[$dtls_vgpt]+1; } } } } // echo "
GESPREKSPARTNER
"; // print_r($vgpt_array); // echo "
GRAMMATICA
"; // print_r($gram_array); // echo "
WOORDEN
"; // print_r($word_array); // echo "
KWALIFICATIES
"; // print_r($kwal_array); echo "
// Welke gesprekspartner kiest u voor uw gesprek
"; ?> "; echo ''; echo ""; } if (count($kwal_array) > 0) { $cw=0; echo "
// What is the subject of our conversation
"; ?> "; echo ''; echo ""; } if (count($word_array) > 0) { // echo "
WOORDEN"; $cw=0; echo "
// What word do you consider relevant
"; ?> "; echo ''; echo ""; } if (count($gram_array) > 0) { // echo "
GRAMMATICA"; foreach ($gram_array as $vgpt_key => $vgpt_val) { $lvgpt_key="".$vgpt_key.""; // $lvgpt_key="".$vgpt_key.""; // echo "--".$lvgpt_key; } } ///// ?>
DATUM".$invr_bzkr."".$invr_chbt."
".$datm."".$pattern."".$template."
Onderwerp
Deze module is in onderhoud en in alphatest
// Bepaal Aanknopingspunten in het korte termijn geheugen //"; foreach ($vrag_array as $vrag_key => $vrag_val) { if ($vrag_key != "sleutelwoord") { $sw=0; $aiml_rslt=xtrt_aiml($vrag_key,"nederlands"); krsort($aiml_rslt); if ($sw==0) { // echo "
".$key_text; $sw=$sw+1;; } // print_r($aiml_rslt); foreach($aiml_rslt as $aiml_key => $aiml_val) { // echo "
AIML KEY ".$aiml_key." AIML VAL ".$aiml_val; $key_dtls=explode("@",$aiml_key); $key_perc=$key_dtls[0]; $key_text=$key_dtls[1]; $key_resp=$key_dtls[2]; $key_cont=$key_dtls[4]; similar_text($say, $key_text, $ptrn_perc); similar_text($vrag_key, $key_text, $tmpl_perc); $ptrn_rond=round($ptrn_perc, 0); $tmpl_rond=round($tmpl_perc, 0); // echo "
".$key_text."--".$key_resp." TMPL ROND ".$tmpl_rond." PTRN ROND ".$ptrn_rond; if ($ptrn_rond > 25 and $sw==1 and $key_cont != null) { ?>
0) { echo ""; echo "
Aan ".$invr_vgpt." gerelateerde chatbots en corpora:
"; echo ""; foreach($chbt_rslt as $chbt_key => $chbt_val) { // echo "
".$chbt_key; $chbt_dtls=explode("!!",$chbt_key); $chbt_taal=$chbt_dtls[1]; $chbt_chbt=$chbt_dtls[2]; $chbt_smdm=$chbt_dtls[3]; $chbt_corp=$chbt_dtls[4]; $chbt_levl=$chbt_dtls[6]; $chbt_host=$chbt_dtls[7]; // echo "
CHBT LEVL ".$chbt_levl; $chbt_url="https://www.".$chbt_dtls[7]; $chbt_xbot="https://www.semanta.nl/semanta/utr-srch.php?lgrm=".$chbt_corp."&domn=".$invr_domn.">"; if (substr($chbt_host,1,7) == "semanta") { $chbt_url="https://www.semanta.nl".$chbt_dtls[7]; } echo ""; } if ($chbt_levl==1) { // echo ""; } if ($chbt_levl==2) { echo ""; } // echo " ".$chbt_corp; $corp_array[$chbt_corp]=$corp_array[$chbt_corp]+1; $chbt_array[$chbt_chbt]=$corp_array[$chbt_chbt]+1; // echo "
GEVONDEN ?".$file_array[$chbt_corp]; } } echo "
".$chbt_corp.""; // echo "
BASE URL ".$chbt_url; if ($chbt_levl==0 and $chbt_chbt= $invr_chbt) { // echo "
Gesprekspartner ".$chbt_chbt."
Chatbots ".$chbt_chbt."
Object ".$chbt_corp."
"; ////////////////////////////////////////////// $data_rslt=xtrt_xxxx($invr_domn,"nederlands","data",24); // print_r($data_rslt); echo ""; if (count($data_rslt) > 0 ) { // echo "
"; krsort($data_rslt); foreach($data_rslt as $data_key => $data_val) { // echo ""; $data_itms=explode("!!",$data_key); // echo "
TITLES KEY ".$data_key." VAL ".$data_val; $data_taal=$data_itms[1]; $data_corp=$data_itms[2]; $corp_array[$data_corp]=$corp_array[$corp_data]+1; $data_cont=$data_itms[3]; $data_link=$data_itms[4]; $rslt_array[$data_link]=$rslt_array[$data_link]+1; // echo "
DATA CORP ".$data_corp." DATA LINK ".urlencode($data_link); if ($data_link != null) { // echo "
niet null DATA CORP ".$data_corp." DATA LINK ".urlencode($data_link); if (substr($data_cont,0,7) == "./data/" and substr($data_link,0,7) != "./data/") { if ($drelt != $data_corp) { $drelt=$data_corp; $sdata_link=str_replace(" ","+",$data_link); $file_0000="./data/".$data_corp."/lnk00000.dat"; /// $text_file="./data/".$data_corp."/lnk00000.dat"; // echo "
TEXT FILE ".$text_file." SIZE ".filesize($text_file)."
"; $open_corp=$text_file; $f = fopen($text_file, "r"); $word_count=0; $line_count=0; $full_docm=""; while ($line = fgets($f, 1000)) { $title_lngt=(strlen($line)-10); if (substr($line,0,10) == "THE_TITLE:") { $title=substr($line,10,$title_lngt); $stitle=str_replace(" ","+",$title); $ltitle="".$title.""; // echo "
LINE ".$line; $titl_pntr=ftell($f); if ($titl_sw ==0) { $titl_sw=1; $domn_titl=$title; if ($userip != "84.24.147.72") { // echo "This action cannot be completed for this IP Address. Please contact us"; // break; } } } } /////////////////////////////////////////// $ldata_link="".$data_corp.""; $spec_rslt=bepl_spec($data_link); // echo "
COUNTER SPEC RSLT ".count($spec_rslt); $spec_dtls=explode("-",$spec_rslt); // print_r($spec_dtls); foreach($spec_dtls as $spec_key => $spec_val) { if (spec_dtls[1] != null) { $spec_dtls=explode("!!",$spec_val); // echo ""; // echo ""; } } echo ""; } } } } } echo "
".$spec_dtls[1]."
".$spec_val."
".$title."".$ldata_link."
"; //// exit; $mtph_aiml=metaphone($invr_domn, 8); $mtph_aiml=strtolower($mtph_aiml); $file_name="./data/aiml/".$mtph_aiml.".aiml"; $file_name=str_replace(" ","_",$file_name); echo "
FILE NAME".$file_name; $f = fopen($file_name, "r"); $word_count=0; $line_count=0; $full_docm=""; while ($line = fgets($f, 1000)) { echo "
".$line; } fclose($fq); $fq = fopen($file_name, 'w'); $invr_lgrm=strtolower($invr_lgrm); $rfer_srvr=$_SERVER['SERVER_NAME']; $rfer_url=$_SERVER['HTTP_REFERER']; $userip=$_SERVER['REMOTE_ADDR']; $lgroet=chbt_date("IT@1@2@".$invr_taal."@".$invr_bzkr); $curr_jaar=$lgroet[jaar]; $curr_dag=$lgroet[dag]; $curr_mand=$lgroet[deze_maand]; $zoek_datm=$curr_jaar."-".$curr_mand; // print_r($lgroet); $imge_name=str_replace("-","",$invr_corp); ?>

$posn_val) { // echo "
POSN KEY ".$posn_key." POSN VAL ".$posn_val; $posn_itms=explode("!!",$posn_key); // print_r($posn_itms); $bild_posn=substr($posn_itms[0],0,2); $bild_text=$posn_itms[1]; if (substr_count($bild_text, ' ') > 3 and $bild_posn != 50) { echo "
".$bild_posn." BILD TEXT ".$bild_text; } } echo "
AIML RSLT ".$aiml_rslt; echo ""; $bild_rslt=tlkd_smts($invr_lgrm); $sw=0; foreach($bild_rslt as $bild_key => $bild_val) { $bild_key=strtolower($bild_key); $bild_itms=explode("!!",$bild_key); $bild_text=$bild_itms[0]; $bild_gram=$bild_itms[1]; $bild_posn=$bild_itms[2]; if ($bild_posn == "0") { $sw=$sw+1; $bild_txt1=$bild_text; $star_text=$bild_txt1." *"; $bild_txt2=str_replace($bild_text,"",$invr_lgrm); $bild_txt2=trim($bild_txt2); if (substr_count($itms_val, ' ') > 3) { $sw_lgrm=1; } } } // echo "
EN HOE IS HET BIJ AIML
INVR CORP ".$invr_corp." INVR NAME ".$invr_name." INVR bzv1 ".$invr_bzv1."INVR LGRM ".$invr_lgrm." INVR CHBT ".$invr_chbt." INVR VRAG ".$invr_vrag." INVR DOMN ".$invr_domn." INVR BEGN ".$invr_begn." INVR EIND ".$invr_eind; // echo '
<category><pattern>'.$bild_txt1.' *</pattern><template>'.$invr_begn.'<think><set name="invrbegn"><star/></set></think>'; // echo '
'.$bild_txt1.'*<srai>'.$bild_txt1.'</srai><sr/></template></category>'; $srai_tmpl=$bild_txt1.'*<srai>'.$bild_txt1.'</srai><sr/>'; $sql1 = "INSERT INTO `aiml` (`id`,`bot_id`,`aiml`,`pattern`,`thatpattern`,`template`,`domn`,`taal`,`filename`,`levl`,`datm`) VALUES ('null','1','$invr_domn','$star_text','$bild_txt1','$srai_tmpl','$invr_domn','$invr_taal','uttr-srch','0','$datm')"; mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8"); $logentry_result = mysql_query($sql1, $link); // echo '
<category><pattern>'.$bild_txt2.'</pattern><template>'.$invr_eind.'</template></category>'; $sql1 = "INSERT INTO `aiml` (`id`,`bot_id`,`aiml`,`pattern`,`thatpattern`,`template`,`domn`,`taal`,`filename`,`levl`,`datm`) VALUES ('null','1','$invr_domn','$bild_txt2','','$ínvr_eind','$invr_domn','$invr_taal','uttr-srch','0','$datm')"; mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8"); $logentry_result = mysql_query($sql1, $link); $aiml_rslt='<category><pattern>'.$bild_txt2.' *</pattern><template>'.$invr_eind.'<think><set name="invreind"><star/></set></think><srai>'.$invr_bzv1.'</srai><sr/></template></category><category><pattern>'.$bild_txt2.'</pattern><template>'.$invr_domn.'</template></category>'; //// ////$wrte_aiml=str_replace("<","/WRTE AIML ".$wrte_aiml; if ($sw > 0) { ?>
".$cs."-".$invr_lgrm.""; $sw_eror=0; $cs=$cs+1; // echo ""; // echo "
Top of Page"; // echo "
".$cs."-".$strn_val.""; $smts_rslt=tlkd_smts($invr_lgrm); $strn_val=$invr_lgrm; // print_r($smts_rslt); $tlkd_rslt=smta_tlkd($invr_lgrm."@tlkd"); $tlkd_smts=array(); // echo "
TLKD RSLT
"; foreach ($tlkd_rslt as $tlkd_key => $tlkd_val) { $last_text=""; // echo "
KEY ".$tlkd_key." VAL ".$tlkd_val; $key_itms=explode("@",$tlkd_key); // echo "
KEY ITMS
"; // print_r($key_itms); $tlkd_gram=$key_itms[0]; $tlkd_form=$key_itms[1]; $tlkd_gram=trim($tlkd_gram); $tlkd_form=trim($tlkd_form); $stlkd_form=str_replace(" ","+",$tlkd_form); $stlkd_gram=str_replace(" ","+",$tlkd_gram); $tlkd_form=str_replace("START","",$tlkd_form); // echo "
TLKD KEY".$tlkd_key." TLKD VAL ".$tlkd_val." GRAMMATICA ".$tlkd_gram." WOORDVORM ".$tlkd_form."
"; /////////////////////// $tlkd_pos=strpos($strn_val,$tlkd_form,0); // echo "
TLKD POS ".$tlkd_pos; $ptlkd_form="".$tlkd_form.""; $pline_bzv1=str_replace($tlkd_form,$ptlkd_form,$strn_val); // echo "
".$ptlkd_form; if ($tlkd_pos === false) { // echo "
The string ".$tlkd_form." was not found in the string ".$line_bzv1; } else { // echo "
STRING FOUND TLKD FORM ".$tlkd_form."
"; $form_dtls=explode(" ",$tlkd_form); // echo "
AANTAL FORM DTLS ".count($form_dtls); // print_r($form_dtls); $tlkd_dtls=explode($tlkd_form,$strn_val); // echo "
".$tlkd_form."
"; // echo "
AANTAL TLKD DTLS ".count($tlkd_dtls); // print_r($tlkd_dtls); if (count($tlkd_dtls) > 1 and count($form_dtls) == 2) { // echo "
<category><pattern>".$tlkd_form." * </pattern><template><srai>".$tlkd_dtls[0]."><star/></srai></template></category>"; // print_r($tlkd_dtls); } $pline_bzv1=str_replace($tlkd_form,$ptlkd_form,$strn_val); // echo "
".$pline_bzv1; // echo "
".$tlkd_form."+".$tlkd_val; $tlkd_smts[$tlkd_form."+".$tlkd_val]=$tlkd_smts[$tlkd_form."+".$tlkd_val]+1; // echo "
".$tlkd_form.""; // echo "
LOCATIE ".$tlkd_form." POS ".$tlkd_pos; // $tlkd_itms=explode(" ",$tlkd_form); // echo "
TLKD ITMS
"; // print_r($tlkd_itms); } } $fk=0; // echo "
".$cs."-".$strn_val; // echo "
Pattern 1Template 1
Pattern 2Template 2
"; // echo ""; $gr=0; ksort($tlkd_smts); foreach($tlkd_smts as $tlkd_key => $tlkd_val) { // echo "
TLKD SMTS KEY ".$tlkd_key." VAL ".$tlkd_val; $smts_plus=explode("+",$tlkd_key); // print_r($smts_plus); $smts_text=$smts_plus[0]; $smts_gram=$smts_plus[1]; $ssmts_text=str_replace(" ","+",$smts_text); $sinvr_lgrm=str_replace(" ","+",$invr_lgrm); $smts_perd=explode(".",$smts_gram); // echo "
SMTS TEXT ".$smts_text. "TAAL ".$text_taal; // print_r($smts_perd); $text_dtls=explode(" ",$smts_text); if ($hrelt != $smts_text and count($text_dtls) > 2) { $llpzg_qstn="QenA"; $lpzg_rslt=xtrt_xxxx("xdotx".$smts_text,$invr_taal,"rule",2); // print_r($lpzg_rslt); // echo ""; foreach($lpzg_rslt as $lpzg_key => $lpzg_val) { $lpzg_dtls=explode("!!",$lpzg_key); // print_r($lpzg_dtls); // echo ""; $lpzg_lnks=$lpzg_dtls[3]; $lpzg_rchs=$lpzg_dtls[4]; $lpzg_array[$lpzg_lnks."@".$lpzg_rchs."@".$smts_text]=$lpzg_array[$lpzg_lnks."@".$lpzg_rchs."@".$smts_text]+1; } // echo ""; // echo ""; $hrelt = $smts_text; $smts_itms=explode(" ",$tlkd_key); // print_r($smts_itms); // echo "
AANTAL SMTS ITMS ".count($tlkd_smts); $sinvr_domn=str_replace(" ","+",$invr_domn); $gram_itms=explode(".",$tlkd_key); // print_r($gram_itms); // echo "
GRAM ITMS ".$gram_itms[1]; $form_itms=explode("+",$gram_itms[0]); // print_r($form_itms); $wrds_form=$form_itms[0]; $form_gram=$form_itms[1]; $wrds_gram=$gram_itms[1]; $isrt_qstn=""; $prchs_val=""; } } // print_r($lpzg_array); ksort($lpzg_array); foreach($lpzg_array as $lpzg_key => $lpzg_val) { $lpzg_dtls=explode("@",$lpzg_key); // echo ""; } //////////////////////////////////////////////////////////// ///////////////// if ($invr_cont == null) { $invr_cont=$invr_lgrm; } $calc_rslt=calc_text($invr_lgrm); // print_r($calc_rslt); // echo "
SegmentQuestionGrammatica
".$smts_text."".$llpzg_qstn."".$smts_gram."
".$lpzg_dtls[3]."
".$form_gram."-".$wrds_gram."".$rchs_itms[0]."".$rchs_itms[1]."
".$form_gram."-".$wrds_gram."".$srchs."
".$lpzg_dtls[0]."".$lpzg_dtls[1]."".$lpzg_dtls[2]."
"; $sent_lgrm=str_replace(",",".",$invr_lgrm); // echo"
SENT LGRM COMMA ".$sent_lgrm; $sent_lgrm=str_replace("?",".",$sent_lgrm); $sent_lgrm=str_replace("!",".",$sent_lgrm); $sent_dtls=explode(".",$sent_lgrm); // echo "
SEMANTA Onderwerp:".$invr_cont."
"; echo "
"; $spec_rslt=bepl_spec($invr_lgrm); // echo "
SMTS TEXT ".$smts_text; $spec_dtls=explode(">",$spec_rslt); // print_r($spec_dtls); foreach($spec_dtls as $spec_key => $spec_val) { $spec_itms=explode("-",$spec_val); foreach($spec_itms as $itms_key => $itms_val) { $itms_val=strtolower($itms_val); // echo "
ITMS VAL ".$itms_val; if (substr_count($itms_val, ' ') > 1) { if ($irelt != $itms_val) { $irelt=$itms_val; ?> <category><pattern>'.$itms_val.'</pattern><template>'.$invr_vrag.'</template></category>'; fopen($fq,w); $aiml_rslt='<category><pattern>'.$invr_bzv1.' *</pattern><template>'.$invr_eind.'<think><set name="invrbzv2"><star/></set></think><srai>'.$invr_bzv1.'</srai><sr/></template></category><category><pattern>'.$invr_bzv2.'</pattern><template>'.$invr_domn.'</template></category>'; $wrte_aiml=str_replace("<","/"; } } } } foreach($sent_dtls as $sent_key => $sent_val) { $smts_rslt=tlkd_smts($sent_val); // print_r($smts_rslt); if ($sent_val != null) { //////////////// $calc_rslt=calc_text($sent_val); // echo "
".$spec_val."
"; foreach($calc_rslt as $calc_key => $calc_val) { // echo ""; } // echo "
".$calc_key."".$calc_val."
"; // echo "
REACTIE "; $emt_rslt=explode(",",$calc_rslt['xemtx']); foreach($emt_rslt as $emt_key => $emt_val) { if ($emt_val != "lachebekje" and $emt_val!= null) $emt_freq[$emt_val]=$emt_freq[$emt_val]+1; } arsort($emt_freq); $fsw=0; foreach($emt_freq as $freq_key => $freq_val) { if (strlen($freq_key) > 3) { if ($fsw == 0) { // echo "-".$freq_key.""; $fsw=1; } } } $calc_rslt=calc_text($invr_lgrm); // echo "KARAKTER-".$calc_rslt['xkrkx']; $rslt_krkt=$calc_rslt['xkrkx']; $rslt_gevl=$calc_rslt['xgvlx']; $rslt_array["xkrkx!!".$rslt_krkt]=$rslt_array["xkrkx!!".$rslt_krkt]+1; $rslt_array["xgvlx!!".$rslt_gevl]=$rslt_array["xgvlx!!".$rslt_gevl]+1; echo "
".$calc_rslt[karakter]."".$calc_rslt[xgvlx]."
"; // echo "-GEVOEL ".$calc_rslt['xgvlx']; if ($calc_rslt[zinslengte] > 128) { $sinvr_lgrm=str_replace(" ","+",$invr_lgrm); echo "
De tekst is een ".$calc_rslt[teksttype]." in het ".$calc_rslt[taal]." de lengte van de tekst is ".$calc_rslt[zinslengte]." en omvat ".$calc_rslt[zinnen]." zinnen of zinsdelen"; echo ". Het aantal woorden in de tekst ".$calc_rslt[woorden]." met een gemiddeld aantal woorden per zin ".$calc_rslt[woordenperzin]." waarvan het taalniveau uitkomt op ".$calc_rslt[taalniveau]; echo "
De tekst voor ".$calc_rslt[teksttype]." is te lang voor een direct antwoord u kunt hier splitsen "; // exit; } $aiml_rslt=xtrt_aiml($sent_val); // print_r($aiml_rslt); foreach($aiml_rslt as $aiml_key => $aiml_val) { if($ar == 0 ) { // $ar=1; // echo "
AIML KEY ".$aiml_key." AIML VAL ".$aiml_val; $aiml_itms=explode("@",$aiml_key); $aiml_antw=$aiml_itms[2]; // echo "
AIML ANTW ".$aiml_antw; $antw_itms=explode(" ",$bzv1_init); foreach($antw_itms as $antw_key => $antw_val) { $antw_array[$antw_val]=strlen($antw_val); } } arsort($antw_array); if ($ar < 3) { // print_r($antw_array); foreach($antw_array as $antw_rslt => $antw_seqn) { // echo "
ANTW RSLT ".$antw_rslt; $ar=$ar+1; } } } $invr_lnks=$aiml_antw; if ($invr_cont == null) { $invr_cont=$sent_val; } $antw_dtls=explode("=",$aiml_antw); $antw_text=$antw_dtls[0]; $antw_corp=$antw_dtls[1]; if ($antw_corp == null) { $antw_corp="semanta"; } $antw_text=str_replace("invrmand",$curr_mand,$antw_text); $santw_text=str_replace(" ","+",$antw_text); $sinvr_lgrm=str_replace(" ","+",$invr_lgrm); echo "
".$sent_val."
".$antw_text.""; /////////////////// // echo "
SENT VAL ".$sent_val; $smta_rslt=xtrt_xxxx("----",$invr_taal,"smta",4); if(count($smta_rslt) > 0) { // echo "

Korte termijn geheugen

"; } foreach($smta_rslt as $smta_key => $smta_val) { $smta_itms=explode("!!",$smta_key); // print_r($smta_itms); $smta_scre=$smta_itms[0]; $smta_ipad=$smta_itms[7]; $smta_taal=$smta_itms[1]; $smta_domn=$smta_itms[2]; $smta_lnks=$smta_itms[3]; $smta_rchs=$smta_itms[4]; // echo "".$smta_domn." ".$smta_lnks.""; $lnks_dtls=explode(" ",$smta_lnks); foreach($lnks_dtls as $lnks_key => $lnks_val) { if (strlen($lnks_val) > 4) { $gw27_smta=xtrt_xxxx($lnks_val,$invr_taal,"gw27",0); foreach($gw27_smta as $gw27_key => $gw27_val) { $gw27_itms=explode("!!",$gw27_key); // print_r($gw27_itms); $gw27_scre=$gw27_itms[0]; $sgw27_ipad=$gw27_itms[7]; $gw27_taal=$gw27_itms[1]; $gw27_domn=$gw27_itms[2]; $gw27_lnks=$gw27_itms[3]; $gw27_rchs=$gw27_itms[4]; $gw27_gram=explode(",",$gw27_rchs); // print_r($gw27_gram); foreach($gw27_gram as $gram_key =>$gram_val) { if (strlen($gram_val) == 3) { // echo "".$lnks_val." ".$gram_val.""; $mmry_array[$lnks_val]."@".$gram_val=$mmry_array[$lnks_val]."@".$gram_val+1; } } } } } } echo "
MMRY ARRAY "; // print_r($mmry_array); asort($mmry_array); foreach($mmry_array as $mmry_key =>$mmry_val) { echo "MEMORY TEKSTEN".$mmry_key." ".$mmry_val.""; } /////////////////////////////////////////////////////////////////////// echo "".$sent_val."Specifiek
antwoordGeneriek
antwoord"; // $gvkr_rslt=bepl_gvkr($sent_val); // print_r($gvkr_rslt); foreach($gvkr_rslt as $smts_key => $smts_val) { // echo "
EERSTE TEKEN ".$smts_val[0]; $val_dtls=explode(" ",$smts_val); // echo "
Kenmerk2 ".$smts_key." ".$smts_val; if($smts_val[0] != "@") { // print_r($val_dtls); $smts_val[0]="-"; $smts_val[1]="-"; $smts_val=str_replace("--","",$smts_val); $ssmts_val=str_replace(" ","+",$smts_val); } $psmts_val="".$smts_val.""; $pinvr_bzv1=str_replace($smts_val,$psmts_val,$sent_val); if($val_dtls[0] > 1) { if( $srelt != $smts_val) { $srelt=$smts_val; } if ($smts_key== "karakter" or $smts_key == "gevoel" or $smts_key == "grammatica") { // echo "
Kenmerk 3 ".$smts_key." ".$smts_val; // echo "".$smts_key."== ".$smts_val.""; // $sgmt_rslt=bepl_gvkr($smts_val); // echo "
<".$smts_val." ".$sgmt_key." ".$sgmt_val; foreach($sgmt_rslt as $sgmt_key => $sgmt_val) { echo "
<".$smts_val." ".$sgmt_key." ".$sgmt_val; } $smts_itms=explode("@",$smts_val); // print_r($smts_itms); // echo "
".$smts_key." "; foreach($smts_itms as $itms_key => $itms_val) { // echo "
".$smts_key."== ".$itms_val; if($itms_val != null and $smts_key != 0) { // $itms_rule=xtrt_xxxx("xdotx".$itms_val,$invr_taal,"rule"); echo "--".$itms_key."-".$itms_val; $calc_rslt=calc_text($itms_key); // print_r($calc_rslt); foreach($calc_rslt as $calc_key => $calc_val) { $summ_array[$calc_key]=$summ_arrya[$calc_key]+1; // echo "
CALC KEY ".$calc_key." CALC VAL ".$calc_val; } $lgram_rslt="".$itms_gram.""; echo "".$llink_aiml." ".$lgram_rslt."".$gram_summ.""; // echo "".$llink_xbot."".$lgram_rslt."".$gram_summ."~~ ".$gram_desc."
"; $trelt=$itms_text; $link_smts="".$itms_text.""; // echo "
".$link_smts; } } } // $smts_type=$smts_itms[0]; // $smts_sgmt=$smts_itms[1]; // $smts_text=$smts_itms[2]; // $sgmt_itms=explode(" ",$smts_text); // $itms_cntr=count($sgmt_itms); } echo ""; } //////////////////////////////////////////////////////////////////////// $sv=0; foreach($smta_rslt as $smta_key => $smta_val) { $smta_itms=explode("!!",$smta_key); // print_r($smta_itms); $smta_scre=$smta_itms[0]; $smta_ipad=$smta_itms[7]; $smta_taal=$smta_itms[1]; $smta_lnks=$smta_itms[3]; $sim = similar_text($sent_val, $smta_lnks, $perc); // echo "
PERC ".round($perc, 2); $perc_array[$smta_lnks]=round($perc, 2); if ($perc > 74) { // echo "Het lijkt erop dat u het onderwerp ".$smta_lnks." aansnijdt met ".$sent_val.""; $invr_cont=$smta_lnks; } $smta_rslt=xtrt_xxxx($sent_val,$invr_taal,"lpzg",12); foreach($smta_rslt as $smta_key => $smta_val) { $smta_itms=explode("!!",$smta_key); // print_r($smta_itms); $smta_scre=$smta_itms[0]; $smta_ipad=$smta_itms[7]; $smta_taal=$smta_itms[1]; $smta_lnks=$smta_itms[3]; $sim = similar_text($sent_val, $smta_lnks, $perc); // echo "
LPZG PERC ".round($perc, 2); $perc_array[$smta_lnks]=round($perc, 2); // echo " Antwoord ".$smta_lnks; $rrelt=$bzv1_rchs; $sv=$sv+1; } } } } arsort($perc_array); echo ""; // print_r($perc_array); $pa=0; echo ""; foreach($perc_array as $perc_key => $perc_val) { if ($pa < 5) { $invr_lgrm=strtolower($sent_val); $line_dtls=explode(" ",$invr_lgrm); // print_r($line_dtls); $ld=0; foreach($line_dtls as $line_key => $line_val) { if (strlen($line_val) > 4) { $cline_val="".$line_val.""; $perc_key=str_replace($line_val,$cline_val,$perc_key); } } echo ""; $ld=0; $pa=$pa+1; } } // echo ""; foreach($sent_dtls as $sent_key => $sent_val) { $invr_lgrm=strtolower($sent_val); $line_dtls=explode(" ",$invr_lgrm); $cmds_ipad=$userip; $cmds_bzv2=$invr_lgrm."[smta[".$invr_taal."[".$rfer_srvr."[onderwerp[0"; // echo "
SMTA INVR BZV2 ".$cmds_bzv2; include ("chbt-cmds-code-2.php"); foreach($line_dtls as $line_key => $line_val) { if (strlen($line_val) > 3) { $lbzv1_bol="
Een boek over ".$line_val."
"; echo ""; } if (strlen($line_val) > 2) { if ($spec_conc == null) { $spec_conc= "onderwerp"; } $gw27_rslt=xtrt_xxxx($line_val,$invr_taal,"gw27",0); echo ""; // echo "
LINE VAL ".$line_val." GW27 RSLT COUNT ".count($gw27_rslt); if (count($gw27_rslt) == 0 and strlen($line_val ) > 4) { $lline_val="".$line_val.""; // echo "
".$line_val.""; echo "
INVR TAAL ".$invr_taal." INVR BZV1 ".$line_val; echo "
ONBEKENDE WOORDVORM.".$lline_val; echo "
LINE VAL ".$line_val; $eror_array[$line_val]=$eror_array[$line_val]+1; } if (count($gw27_rslt) > 0) { $sw=0; foreach($gw27_rslt as $gw27_key => $gw27_val) { $chbt_itms=explode("!!",$gw27_key); // print_r($chbt_itms); $bzv1_scre=$chbt_itms[0]; $bzv1_taal=$chbt_itms[1]; $bzv1_corp=$chbt_itms[2]; // echo "
INVR CORP ".$invr_corp." CHBT CORP ".$chbt_corp; $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; if ($invr_corp == $chbt_corp) { // $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; } $schbt_corp=str_replace(" ","+",$chbt_corp); $bzv1_lnks=$chbt_itms[3]; $bzv1_rchs=$chbt_itms[4]; $rchs_dtls=explode(",",$bzv1_rchs); foreach($rchs_dtls as $rchs_key => $rchs_val) { if ($bzv1_lnks == $line_val) { if ($rchs_val == "mvd" or $rchs_val == "znw") { $splt_rslt=xtrt_wiki($invr_taal,$line_val); // print_r($splt_rslt); foreach($splt_rslt as $splt_key => $splt_val) { $wiki_rslt=explode("@",$splt_val); // print_r($wiki_rslt); foreach($wiki_rslt as $wiki_key => $wiki_val) { $wiki_dtls = explode(" ",$wiki_val); $swiki_val=str_replace(" ","+",$wiki_val); $lbzv1_lnks="
".$bzv1_lnks."
"; if (count($wiki_dtls) > 2 and strlen($wiki_val) < 128) { $lbzv1_lnks="
".$bzv1_lnks."
"; echo ""; } if (count($wiki_dtls) > 2 and strlen($wiki_val) > 128) { echo ""; } } } // echo "
Semanta ".$bzv1_lnks." ".$rchs_val; } } } if($sw== 0) { $sw=1; foreach($rchs_dtls as $rchs_key => $rchs_val) { $gram_rslt=gram_rule($rchs_val,$line_val,$invr_taal); // print_r($gram_rslt); foreach($gram_rslt as $gram_key => $gram_val) { $gram_dtls=explode("!!",$gram_val); // print_r($gram_dtls); $gram_text=$gram_dtls[0]; $text_dtls=explode(" ",$gram_text); if (count($text_dtls) > 1) { // echo "
INVR BZV1 ".$invr_bzv1." INVR_LGRM ".$invr_lgrm." INVR DOMN ".$invr_domn; $sgram_text=str_replace(" ","+",$gram_text); $ssent_val=str_replace(" ","+",$sent_val); $lxtrt_rule="".$gram_text.""; echo ""; } } echo ""; } } // print_r($rchs_dtls); $bzv1_datm=$chbt_itms[5]; $bzv1_levl=$chbt_itms[6]; $bzv1_url=$chbt_itms[7]; $cmds_bzv2=$line_val."!!".$smts_tlkd."[sgmt[".$invr_taal."[".$spec_conc."[".substr($invr_lgrm,0,64)."[".$vr; // echo "
SMTA INVR BZV2 ".$cmds_bzv2; // include ("chbt-cmds-code-2.php"); } } } } if (count($line_dtls) > 1) { $spec_rslt=bepl_spec($invr_lgrm); /// echo "
SMTS TEXT ".$smts_text; $spec_dtls=explode(">",$spec_rslt); foreach($spec_dtls as $spec_key => $spec_val) { $spec_dtls=explode("!!",$spec_val); echo ""; // echo ""; } // print_r($spec_dtls); foreach($spec_dtls as $spec_key => $spec_val) { // echo "
".$spec_dtls[0]."".$spec_dtls[1]; if ($spec_val != $spec_rslt) { $spec_dtls[1]=trim($spec_dtls[1]); if (count($spec_dtls) > 1 and $spec_val != null and $spec_dtls[1] != null) { $spec_conc=str_replace("!!","",$spec_dtls[1]); // echo "
".$spec_dtls[0]."".$spec_dtls[1]; } } } // echo "

".$invr_lgrm."

"; $smts_rslt=tlkd_smts($invr_lgrm); // print_r($smts_rslt); $sw=0; foreach($smts_rslt as $smts_key => $smts_val) { $smts_dtls=explode("!!",$smts_key); $smts_text=$smts_dtls[0]; $smts_tlkd=$smts_dtls[1]; $smts_posn=$smts_dtls[2]; $text_itms=explode(" ",$smts_text); if ($sw== 0 and count($text_itms) > 1) { $sw=1; $open_smts=$smts_text; } $text_itms=explode(" ",$smts_text); if ($smts_posn == 0) { $psmts_text = $smts_text."-"; } if ($smts_posn == 50) { $psmts_text = "-".$smts_text."-"; } if ($smts_posn == 99) { $psmts_text = "-".$smts_text; } if (count($text_itms) == 2) { $two_rslt[$psmts_text]=$two_rslt[$psmts_text]+1; $spec_rslt=bepl_spec(" ".$smts_text." "); $spec_dtls=explode("!!",$spec_rslt); // echo "
SPEC RSLT ".$spec_rslt; foreach($spec_dtls as $spec_key => $spec_val) { if ($psmts_text != $srelt) { $spec_dtls[1]=trim($spec_dtls[1]); // $spec_conc=str_replace("-","",$spec_dtls[1]); // echo "
".$spec_dtls[0]."--".$spec_dtls[1]; $conc_rslt=$spec_dtls[1]; if ($conc_rslt !=null) { $conc_array[$conc_rslt]=$conc_array[$conc_rslt]+1; echo "
TEXT ".$psmts_text." TWO ".$spec_dtls[0]."--".$spec_dtls[1]; } $srelt=$psmts_text; } } } // echo ""; if (count($text_itms) > 2) { if ($prelt != $psmts_text) { $prelt=$psmts_text; $cmds_ipad=$invr_corp; $spec_rslt=bepl_spec($smts_text); // echo "
SMTS TEXT ".$psmts_text; // echo "
SEMANTA Interpretatie ".$spec_rslt; $spec_dtls=explode("!!",$spec_rslt); // print_r($spec_dtls); foreach($spec_dtls as $spec_key => $spec_val) { if ($spec_val != $spec_rslt) { $spec_dtls[1]=trim($spec_dtls[1]); if (count($spec_dtls) > 1 and $spec_val != null and $spec_dtls[1] != null) { $spec_conc=str_replace("-","",$spec_dtls[1]); $conc_rslt=$spec_dtls[1]; $three_rslt[$conc_rslt]=$three_rslt[$conc_rslt]+1; // echo "
TEXT ".$psmts_text." THREE ".$spec_dtls[0]."--".$spec_dtls[1]; } } } } if ($spec_conc == null) { $spec_conc="onderwerp"; } $cmds_bzv2=$psmts_text."!!".$smts_tlkd."[sgmt[".$invr_taal."[".$spec_conc."[".substr($invr_lgrm,0,64)."[".$vr; // echo "
SMTA INVR BZV2 ".$cmds_bzv2; include ("chbt-cmds-code-2.php"); $vr=$vr+1; // $asmts_text=str_replace("-","*",$psmts_text); $asmts_text=str_replace(" ","+",$smts_text); $sinvr_lgrm=str_replace(" ","+",$invr_lgrm); $rule_rslt=xtrt_xxxx($asmts_text,$invr_taal,"rule",0); ksort($rule_rslt); // print_r($rule_rslt); $rv=0; foreach($rule_rslt as $rule_key => $rule_val) { if ($rv < 2) { $rule_itms=explode("!!",$rule_key); $rule_text=$rule_itms[3]; $smts_repl=str_replace("%%","".$smts_text."",$rule_text); // echo "
SMTS TEXT ".$smts_text." REPL_TEXT ".$rule_text." SMTS REPL ".$smts_repl; $rv=$rv+1; } } // echo "
PSMTS TEXT ".$psmts_text." ASMTS TEXT ".$asmts_text; $aiml_rslt=xtrt_aiml($asmts_text); // print_r($aiml_rslt); if (count($aiml_rslt) == 0) { $lsmts_text="".$smts_text.""; if ($lrelt != $lsmts_text) { $lrelt = $lsmts_text; // echo ""; } } if (count($aiml_rslt) > 0) { // echo "
AANTAL ".count($aiml_rslt); $asw=0; $aiml_perc=array(); foreach($aiml_rslt as $aiml_key => $aiml_val) { // echo "
KEY ".$aiml_key."VAL ".$aiml_val; $aiml_dtls=explode("@",$aiml_key); $aiml_corp=$aiml_dtls[0]; $aiml_sgmt=$aiml_dtls[1]; $aiml_antw=$aiml_dtls[2]; $sim = similar_text($aiml_sgmt, $asmts_text, $perc); // echo "
CORP ".$aiml_corp." AIML SGMT ".$aiml_sgmt." ANTW ".$aiml_antw; if ($arelt != $aiml_corp.$aiml_sgmt.$aiml_antw) { $aiml_perc[$aiml_key]=round($perc, 2); $arelt=$aiml.corp.$aiml_sgmt.$aiml_antw; } } arsort($aiml_perc); // print_r($aiml_perc); foreach ($aiml_perc as $perc_key => $perc_val) { if ($asw <3) { $asw=$asw+1; $aiml_dtls=explode("@",$perc_key); $aiml_corp=$aiml_dtls[0]; $aiml_sgmt=$aiml_dtls[1]; $aiml_antw=$aiml_dtls[2]; if ($arelt != $asms_text) { $perc_sgmt=$perc_key; $lsmts_text="".$psmts_text.""; // echo ""; // echo ""; $arelt=$asms_text; } } } // echo "
PERC VAL ".$perc_val." PERC KEY ".$perc_key; } } } } } if (count($conc_array) > 0) { // echo "
CONC ARRAY"; // ksort($conc_array); // print_r($conc_array); } if (count($spec_rslt) > 0) { // echo "
SPEC RSLT"; // ksort($conc_array); // print_r($spec_rslt); } if (count($eror_array) > 0) { echo "
Er zijn onbekende woordvormen"; ksort($eror_array); // print_r($eror_array); $ec=0; foreach($eror_array as $eror_key => $eror_val) { $lwrdv_key="".$eror_key.""; echo "
Bewerken ".$lwrdv_key; } } if (count($zero_rslt) > 0) { //echo "
ZERO RSLT"; // ksort($conc_array); // print_r($zero_rslt); } // print_r($two_rslt); if (count($two_rslt) > 0) { // echo "
ONE TWO RESULT"; // ksort($two_rslt); foreach($two_rslt as $two_key => $two_val) { $stwo_key=str_replace(" ","_",$two_key); $stwo_key=str_replace("-","_",$two_key); // echo "
TWO KEY ".$stwo_key." TWO VAL ".$two_val; $gw27_smta=xtrt_xxxx($stwo_key,$invr_taal,"gw27",0); foreach($gw27_smta as $gw27_key => $gw27_val) { $gw27_itms=explode("!!",$gw27_key); // print_r($gw27_itms); $gw27_scre=$gw27_itms[0]; $sgw27_ipad=$gw27_itms[7]; $gw27_taal=$gw27_itms[1]; $gw27_domn=$gw27_itms[2]; $gw27_lnks=$gw27_itms[3]; $gw27_rchs=$gw27_itms[4]; $gw27_gram=explode(",",$gw27_rchs); // print_r($gw27_gram); foreach($gw27_gram as $gram_key =>$gram_val) { if (strlen($gram_val) > 3) { // echo ""; $mmry_array[$stwo_key]."@".$gram_val=$mmry_array[$stwo_key]."@".$gram_val+1; } } } } } if (count($three_rslt) > 0) { // echo "
THREE RESULT"; ksort($three_rslt); // print_r($three_rslt); } ////////////////// // echo "
INVR LGRM ".$invr_lgrm; $spec_rslt=bepl_spec($invr_lgrm); $bzv1_rslt=xtrt_xxxx($invr_lgrm,$invr_taal,"data",24); // print_r($bzv1_rslt); foreach($bzv1_rslt as $bzv1_key => $bzv1_val) { $chbt_itms=explode("!!",$bzv1_key); // print_r($chbt_itms); $bzv1_taal=$chbt_itms[1]; $bzv1_scre=$chbt_itms[0]; $bzv1_taal=$chbt_itms[1]; $bzv1_corp=$chbt_itms[2]; //echo "
INVR CORP ".$invr_corp." CHBT CORP ".$chbt_corp; $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; if ($invr_corp == $chbt_corp) { // $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; } $schbt_corp=str_replace(" ","+",$chbt_corp); $bzv1_lnks=$chbt_itms[3]; $bzv1_rchs=$chbt_itms[4]; $bzv1_datm=$chbt_itms[5]; $bzv1_levl=$chbt_itms[6]; $bzv1_url=$chbt_itms[7]; if (strlen($invr_lgrm) < 64 and $rrelt != $bzv1_rchs) { $sim = similar_text($invr_lgrm, $bzv1_rchs, $perc); if ($perc > 1) { // echo "
PERC ".round($perc, 2); // echo " SCORE ".$bzv1_scre." ".$bzv1_lnks; $rrelt=$bzv1_rchs; } } } $chbt_rslt=xtrt_xxxx($invr_lgrm,$invr_taal,"base",0); // print_r($chbt_rslt); if (count($chbt_rslt) > 0) { echo "Website"; foreach($chbt_rslt as $chbt_key => $chbt_val) { $chbt_itms=explode("!!",$chbt_key); print_r($chbt_itms); $chbt_taal=$chbt_itms[1]; $chbt_scre=$chbt_itms[0]; $chbt_taal=$chbt_itms[1]; $chbt_corp=$chbt_itms[2]; // echo "
INVR CORP ".$invr_corp." CHBT CORP ".$chbt_corp; $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; if ($invr_corp == $chbt_corp) { // $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; } $schbt_corp=str_replace(" ","+",$chbt_corp); $chbt_lnks=$chbt_itms[3]; $chbt_rchs=$chbt_itms[4]; $chbt_datm=$chbt_itms[5]; $chbt_levl=$chbt_itms[6]; $chbt_url=$chbt_itms[7]; $lxtrt_data="".$chbt_rchs.""; echo ""; } } // echo "

Vergelijkbare uitingen

".$perc_val."".$perc_key."

Wiki resultaten

".$lbzv1_bol."

".$line_val."

".$lbzv1_lnks."".$wiki_val."
".$lbzv1_lnks."".$wiki_val."
".$line_val."".$lxtrt_rule."
".$bzv1_lnks."".$rchs_val."
".$spec_dtls[0]."".$spec_dtls[1]."
".$spec_val."
".$open_smts."".$psmts_text."
".$lsmts_text."
".$aiml_corp."".$aiml_sgmt."".$lsmts_text."
".$lsmts_text."
".$stwo_key." ".$gram_val."
TaalGesprekspartnerKennisdomeinCorpus
".$chbt_taal."".$chbt_corp."".$chbt_lnks."".$lxtrt_data."
"; if ($invr_tabl== null) { $invr_tabl="base"; } //echo "
INVR TABL ".$invr_tabl; $omsc_rslt=xtrt_xxxx($invr_tabl,$invr_taal,"omsc"); // print_r($omsc_rslt); foreach($omsc_rslt as $omsc_key => $omsc_val) { $omsc_itms=explode("!!",$omsc_key); $omsc_text=$omsc_itms[4]; echo "
We kunnen zoeken in ".$omsc_text; } /////////// $lgrm_lngt=strlen($invr_lgrm); $mtph_lngt=($lgrm_lngt/4)+2; echo round($mtph_lngt,0, PHP_ROUND_HALF_UP); $mtph_lgrm=metaphone ($invr_lgrm,$mtph_lngt); // echo "
INVR LGRM ".$invr_lgrm."LGRM LNGT ".$lgrm_lngt." MTPN LNGT ".$mtph_lngt." MTPN LGRM ".$mtph_lgrm; /////////// if ($invr_lgrm== null) { $invr_lgrm="Wat doet semanta voor mij"; } $summ_lgrm=""; if ($invr_lgrm != null) { $lgrm_dtls=str_replace("+"," ",$invr_lgrm); // echo "
Wat kregen we binnen TAAL ".$invr_taal. " CHBT ".$invr_chbt." MAIL ".$invr_mail." BZV1".$invr_bzv1." PWRD ".$invr_pwrd." IPAD ".$invr_ipad." TABL ".$invr_tabl." LGRM ".$invr_lgrm." CORP ".$invr_corpm; $lgrm_dtls=explode(" ",$invr_lgrm); // print_r($lgrm_dtls); if (count($lgrm_dtls) > 2) { // echo "Zinsanalyse"; $sinvr_bzv1=str_replace(" ","+",$invr_lgrm); $summ_lgrm=$summ_lgrm." ".$lgrm_val; ?> &pwrd=&bzv1=> "; if (count($lgrm_dtls) > 1) { // echo "Losse woorden "; foreach($lgrm_dtls as $lgrm_key => $lgrm_val) { if (strlen($lgrm_val) > 3) { $summ_lgrm=$summ_lgrm." ".$lgrm_val; ?> &pwrd=&rchs=>- "; } } $sinvr_bzv1=str_replace(" ","+",$summ_lgrm); $srch_tabl="base,lpzg,sgmt"; $srch_dtls=explode(",",$srch_tabl); foreach($srch_dtls as $srch_key => $srch_val) { $invr_tabl=$srch_val; $chbt_rslt=xtrt_xxxx($invr_lgrm,$invr_taal,$invr_tabl); // print_r($chbt_rslt); if(count($chbt_rslt) == 0) { // echo "
Semanta heeft geen zoekwoord ".$invr_lgrm." gevonden in het zoekgebied van ".$srch_val.""; } if(count($chbt_rslt) > 0) { // echo "
Semanta heeft het zoekwoord ".$invr_lgrm." gevonden in ".count($chbt_rslt)." relaties met ".$srch_val." waarvan er max 4 worden getoond "; $sinvr_lgrm=str_replace(" ","+",$invr_lgrm); // print_r($chbt_rslt); // echo "KennisdomeinWebsitechatbotCorpus"; $cn=0; // echo "
Wat kregen we binnen TAAL ".$invr_taal. " CHBT ".$invr_chbt." MAIL ".$invr_mail." BZV1".$invr_bzv1." PWRD ".$invr_pwrd." IPAD ".$invr_ipad." TABL ".$invr_tabl." LGRM ".$invr_lgrm; $nb=0; $nd=0; $nw=0; $nr=0; $ns=0; $nv=0; // echo "
chbt KEY ". $chbt_key." chbt VAL ".$chbt_val; foreach($chbt_rslt as $chbt_key =>$chbt_val) { $chbt_itms=explode("!!",$chbt_key); // print_r($chbt_itms); $chbt_taal=$chbt_itms[1]; $chbt_scre=$chbt_itms[0]; $chbt_taal=$chbt_itms[1]; $chbt_corp=$chbt_itms[2]; //echo "
INVR CORP ".$invr_corp." CHBT CORP ".$chbt_corp; if ($invr_corp == $chbt_corp) { $corp_array[$chbt_key]=$corp_array[$chbt_key]+1; } $schbt_corp=str_replace(" ","+",$chbt_corp); $chbt_lnks=$chbt_itms[3]; $chbt_rchs=$chbt_itms[4]; $schbt_rchs=str_replace(" ","+",$chbt_rchs); $chbt_datm=$chbt_itms[5]; $chbt_levl=$chbt_itms[6]; $chbt_url=$chbt_itms[7]; // echo "
Wat kregen we binnen TAAL ".$invr_taal. " CHBT ".$invr_chbt." MAIL ".$invr_mail." BZV1".$invr_bzv1." PWRD ".$invr_pwrd." IPAD ".$invr_ipad." TABL ".$invr_tabl." LGRM ".$invr_lgrm; if ($chbt_corp != "semanta") { $chbt_array[$chbt_corp."!!".$chbt_taal]=$chbt_array[$chbt_corp."!!".$chbt_taal]+1; } if ($invr_tabl == "wrtv") { if ($nw < 2) { $domn_array[$invr_tabl."@".$chbt_lnks]=$domn_array[$invr_tabl."@".$chbt_lnks]+1; echo "".$chbt_lnks."".$chbt_url." ".$chbt_corp. "". $chbt_rchs." ".$lvgpt_indx.""; $nw=$nw+1; } } if ($invr_tabl == "data") { if ($ns < 2) { $domn_array[$invr_tabl."@".$chbt_rchs]=$domn_array[$invr_tabl."@".$chbt_rchs]+1; // echo "".$chbt_lnks."".$chbt_url." ".$chbt_corp. "". $chbt_rchs." ".$lvgpt_indx.""; $ns=$ns+1; } } if ($invr_tabl == "sgmt") { if ($nr< 2) { $domn_array[$invr_tabl."@".$chbt_rchs]=$domn_array[$invr_tabl."@".$chbt_rchs]+1; // echo "".$chbt_lnks."".$chbt_url." ".$chbt_corp. "". $chbt_rchs." ".$lvgpt_indx.""; $nr=$nr+1; } } if ($invr_tabl == "lpzg") { if ($nv < 2) { $domn_array[$invr_tabl."@".$chbt_lnks]=$domn_array[$invr_tabl."@".$chbt_lnks]+1; // echo "".$chbt_lnks."".$chbt_url." ".$chbt_corp. "". $chbt_rchs." ".$lvgpt_indx.""; $nv=$nv+1; } } if (substr($chbt_lnks,0,6)== "./data") { $domn_array[$invr_tabl."@".$chbt_rchs]=$domn_array[$invr_tabl."@".$chbt_rchs]+1; $file_dtls=explode("/",$chbt_lnks); // print_r($file_dtls); $file_chbt=$file_dtls[2]; $lchbt_lnks="".$file_chbt.""; $luttr_srch=""; // $lvgpt_indx=""; // echo "".$lchbt_lnks."".$chbt_url." ".$chbt_corp. "". $chbt_rchs.""; echo "".$lchbt_lnks."".$luttr_srch."". $chbt_rchs.""; } } } } } echo ""; // print_r($domn_array); $cn=0; foreach($domn_array as $domn_key => $domn_val) { $domn_itms=explode("@",$domn_key); $domn_text=$domn_itms[1]; if ($cn < 24) { // echo "
".$domn_text; if (strlen($invr_lgrm) < 64 and $rrelt != $domn_text) { $sim = similar_text($invr_lgrm, $domn_text, $perc); if ($perc > 0) { $domn_perc=round($perc, 2); $perc_array[$domn_text]=$perc; // echo "".$domn_text."".$domn_perc.""; $rrelt=$domn_text; } } $cn=$cn+1; } } // print_r($eror_array); arsort($perc_array); // print_r($perc_array); foreach($perc_array as $perc_key => $perc_val) { // echo "
".$perc_val."% ".$perc_key; ?>
"; //print_r($chbt_array); arsort($chbt_array); $ca=0; foreach($chbt_array as $chbt_key => $chbt_val) { $ca=$ca+1; if ($ca < 5) { $key_dtls=explode("!!",$chbt_key); $key_corp=$key_dtls[0]; $key_text=$key_dtls[1]; $lchbt_key="".$key_corp.""; echo "
".$lchbt_key; } } ?>