Kennistraining
WE GAAN BEGINNEN INVR BZV1 ".$invr_bzv1." RCHS ".$invr_rchs." DOMN ".$invr_domn." LNKS ".$invr_lnks." TABL ".$invr_tabl." TAAL ".$invr_taal; require_once ("config-smta.php"); require_once ("bepl-sgmt-func.php"); require_once ("bepl-spec-func.php"); require_once ("bepl-taal-func.php"); require_once ("xtrt-aiml-func.php"); require_once ("xtrt-xxxx-func.php"); require_once ("tlkd-smts-func.php"); require_once ("smts-subs-func.php"); require_once ("gram-rule-func.php"); require_once ("gram-tabl.php"); // print_r($conv_tabl); echo "

Stelt of beantwoordt een of meer vragen om de conversatie verbeteren.
"; $bzv1_itms=explode("=",$invr_bzv1); // print_r($bzv1_itms); $invr_lnks=$bzv1_itms[0]; // $invr_rchs=$bzv1_itms[1]; $invr_rchs=str_replace("+"," ",$invr_rchs); $invr_lnks=str_replace("+"," ",$invr_lnks); $invr_bzv1=str_replace("+"," ",$invr_bzv1); $sinvr_bzv1=str_replace("+"," ",$invr_bzv1); $invr_bzv1=trim($invr_bzv1); $invr_lnks=str_replace("+"," ",$invr_lnks); // echo "
INVR TABL ".$invr_tabl; $invr_bzv2=str_replace("+"," ",$invr_bzv2); $vrag_itms=explode("?",$invr_bzv1); $sw_vrag=0; if ($invr_taal == null) { $invr_taal = "nederlands"; } if ($invr_tabl == null) { $invr_tabl= "lpzg"; } $tabl_rslt=xtrt_xxxx($invr_bzv1,$invr_taal,$invr_tabl,16); // echo "
TABL RSL ".$invr_tabl;; // print_r($tabl_rslt); //////////// //////////// $bzv1_rslt=xtrt_xxxx($invr_lnks,$invr_taal,"bzv1",16); // print_r($bzv1_rslt); echo "

Recente conversaties
"; // echo "
".$conv_tabl[$invr_rchs]."
"; $bzv1_cntr=count($bzv1_rslt); $bzv1_usag=$bzv1_cntr-12; // echo "
BZV1 USAG".$bzv1_usag." BZV1 CN ".$bzv1_cntr; $b=0; foreach($bzv1_rslt as $bzv1_key => $bzv1_val) { $binvr_bzv1="font size=6 >".$invr_lnks.""; $bzv1_itms=explode("!!",$bzv1_key); //print_r($bzv1_itms); $sbzv1_lnks=str_replace(" ","+",$bzv1_itms[3]); $bzv1_lnks=str_replace($invr_bzv1,$binvr_bzv1,$bzv1_lnks); $sbzv1_rchs=str_replace(" ","+",$bzv1_itms[4]); $bzv1_domn=$bzv1_itms[2]; $bzv1_lnks=$bzv1_itms[3]; $bzv1_rchs=$bzv1_itms[4]; $bzv1_datm=$bzv1_itms[5]; // echo "
RCHS ".urlencode($bzv1_rchs); $bzv1_rchs=strtolower($bzv1_rchs); $rchs_itms=explode(",",$bzv1_rchs); foreach ($rchs_itms as $rchs_key => $rchs_val) { $rchs_array[$rchs_val]=$rchs_array[$rchs_val]+1; } } // print_r($rchs_array); foreach ($rchs_array as $arra_key => $arra_val) { if ($bzv1_lnks != null and $arra_key != null and $b< 10) { if ($brelt != $arra_key) { $b=$b+1; $brelt = $arra_key; if (substr($arra_key,0,1) != "0" and substr($arra_key,0,1) != "1" and substr($arra_key,0,1) != "2 ") { // echo "
".$bzv1_datm.":".$bzv1_lnks."
".$arra_key."
"; } } } // $b=$b+1; } ///////////////// $bzv1_rslt=xtrt_xxxx($invr_lnks,$invr_taal,$invr_tabl); // print_r($bzv1_rslt); // echo "
Recente conversaties
"; $rchs_array=array(); echo "
Corpus ".$invr_tabl." info ".$conv_tabl[$invr_tabl]."
"; $bzv1_cntr=count($bzv1_rslt); $bzv1_usag=$bzv1_cntr-8; // echo "
BZV1 USAG".$bzv1_usag." BZV1 CN ".$bzv1_cntr; $b=0; $bzv1_rslt=xtrt_xxxx($invr_lnks,$invr_taal,$invr_tabl); foreach($bzv1_rslt as $bzv1_key => $bzv1_val) { $binvr_bzv1="font size=6 >".$invr_bzv1."
"; $bzv1_itms=explode("!!",$bzv1_key); //print_r($bzv1_itms); $sbzv1_lnks=str_replace(" ","+",$bzv1_itms[3]); $bzv1_lnks=str_replace($invr_bzv1,$binvr_bzv1,$bzv1_lnks); $sbzv1_rchs=str_replace(" ","+",$bzv1_itms[4]); $bzv1_domn=$bzv1_itms[2]; $bzv1_lnks=$bzv1_itms[3]; $bzv1_rchs=$bzv1_itms[4]; $bzv1_datm=$bzv1_itms[5]; // echo "
RCHS ".urlencode($bzv1_rchs); $bzv1_rchs=strtolower($bzv1_rchs); $rchs_itms=explode(",",$bzv1_rchs); foreach ($rchs_itms as $rchs_key => $rchs_val) { $rchs_array[$rchs_val]=$rchs_array[$rchs_val]+1; } } // echo "
RCHS ARRAY ".$rchs_array; // print_r($rchs_array); foreach ($rchs_array as $arra_key => $arra_val) { if ($bzv1_lnks != null and $arra_key != null and $b< 10) { if ($brelt != $arra_key) { $b=$b+1; $brelt = $arra_key; echo "
".$bzv1_datm.":".$arra_key."
"; } } // $b=$b+1; } ?> "; if ($sw== 0) { $sw=1; $srchs_frst=str_replace(" ","+",$sgmt_key); $sdomn_frst=str_replace(" ","+",$scnd_tabl[$sgmt_key]); } $tabl_text=$scnd_tabl[$sgmt_key]; // echo "
Praat met :".$sgmt_key."--".$tabl_text."
"; // echo "
tabl_itms"; // print_r($tabl_itms); if ($tabl_text !=null) { echo "
".$tabl_text."
"; $splt_text=$scnd_tabl[$tabl_text]; echo "
".$splt_text."
"; } } if ($sdomn_frst == null) { $sdomn_frst= $invr_domn; } // echo "
WE WAREN BEGONNEN INVR BZV1 ".$invr_bzv1." RCHS ".$invr_rchs." DOMN ".$sdomn_frst." LNKS ".$invr_lnks." RCHS ".$invr_rchs." TABL ".$invr_tabl." TAAL ".$invr_taal; // echo ""; //////////////// $bzv1_itms=explode(" ",$invr_bzv1); // echo "
LINE ".$line." BZV1 IMS Space ".count($bzv1_itms); if (count($bzv1_itms) <2) { $bzv1_dtls=explode(",",$invr_bzv1); if (count($bzv1_dtls) > 1) { $invr_tabl="gw27"; $invr_lnks=$invr_bzv1; } } if (count($bzv1_itms) > 1) { $invr_tabl="bzv1"; $invr_lnks=$line; } // echo "
WE WAREN BEGONNEN INVR BZV1 ".$invr_bzv1." RCHS ".$invr_rchs." DOMN ".$sdomn_frst." LNKS ".$invr_lnks." RCHS ".$invr_rchs." TABL ".$invr_tabl." TAAL ".$invr_taal; $invr_elem=explode(",",$invr_rchs); // echo "
INVR RCHS ".$invr_rchs; // print_r($invr_elem); foreach($invr_elem as $elem_key => $elem_val) { if ($invr_tabl !=null) { // echo "
ELEM VAL".$elem_val; $userip=$_SERVER['REMOTE_ADDR']; $invr_ipad=$userip; // echo "
WE WAREN BEGONNEN INVR BZV1 ".$invr_bzv1." RCHS ".$elem_val." DOMN ".$sdomn_frst." LNKS ".$invr_lnks." TABL ".$invr_tabl." TAAL ".$invr_taal; $sinvr_lnks=str_replace(" ","+",$invr_lnks); $sql1 = "INSERT INTO `$invr_tabl` (`id`,`ipad`,`domn`,`taal`,`lnks`,`rchs`,`levl`,`datm`) VALUES ('0','$invr_ipad','$invr_domn','$invr_taal','$invr_bzv1','$elem_val','10','$datm')"; mysql_query("SET CHARACTER SET utf8"); mysql_query("SET NAMES utf8"); // echo "
INVR ABL ".$sql1; $retval = mysql_query($sql1, $link); } } $invr_wrds=explode(" ",$invr_bzv1); // print_r($invr_wrds); foreach($invr_wrds as $word_key => $word_val) { if (strlen($word_val) > 3) { $rule_rslt=gram_rule($word_val,$invr_taal); // echo "
RULE RSLT "; // print_r($rule_rslt); if (count($rule_rslt) == 0) { echo ""; } if (count($rule_rslt) > 0) { echo "
Utterance
Response
Intention
Synonym
Taal
Uw e-mail-adres om de wijziging te bevestigen
> > > > > > >
START DATE TIME ".$datm; $ontl_strt = microtime(true); $userip=$_SERVER['REMOTE_ADDR']; $invr_bzv1=str_replace("+"," ",$invr_bzv1); $invr_bzv1=trim($invr_bzv1); $invr_lnks=str_replace("+"," ",$invr_lnks); // echo "
INVR TABL ".$invr_tabl; $invr_bzv2=str_replace("+"," ",$invr_bzv2); $vrag_itms=explode("?",$invr_bzv1); if ($invr_tabl== null) { $invr_tabl="gw27"; } if ($invr_vgpt== null) { $invr_vgpt="semantus"; } if ($invr_bzkr== null) { $invr_bzkr="bezoeker"; } $bzv1_wrds=explode(" ",$invr_bzv1); if ($invr_chbt == null) { $invr_chbt="semantus"; } $conv_vgpt=$invr_vgpt; $conv_bzkr=$invr_bzkr; if (count($vrag_itms) > 1) { // echo "
VRAG ITMS "; // print_r($vrag_itms); $conv_conv=$vrag_itms[0]; $conv_vrag=$vrag_itms[1]; $conv_dtls=explode(" ",$conv_conv); $conv_vgpt=$conv_dtls[0]; $conv_bzkr=$conv_dtls[1]; $invr_bzv1=$conv_vrag; } if($invr_lnks == null) { $conv_lnks="Ogenblikje ".$invr_vgpt; } if ($invr_lnks != null) { $conv_lnks=$invr_lnks; } $lnks_qstn=explode("?",$conv_vrag); if (count($lnks_qstn) > 0) echo ""; // echo ""; { foreach ($lnks_qstn as $qstn_key => $qstn_val) { // print_r($lnks_qstn); // echo ""; } } echo "

".$conv_vrag."
".$qstn_key."

"; /////// require_once ("mtsw-tabl.php"); // print_r($splt_tabl); // echo "
SCND ABL"; // print_r($scnd_tabl); if (count($invr_wrds)> 12) { $sgmt_rslt=bepl_sgmt($invr_bzv1,4); } if (count($invr_wrds)> 9) { $sgmt_rslt=bepl_sgmt($invr_bzv1,3); } if (count($invr_wrds) > 6) { $sgmt_rslt=bepl_sgmt($invr_bzv1,2); } $sgmt_rslt=bepl_sgmt($invr_bzv1,1); // echo "
SGM RSL "; // print_r($sgmt_rslt); $sw=0; foreach($sgmt_rslt as $sgmt_key => $sgmt_val) { $vgpt_array=""; $line=$sgmt_key; echo "
".$sgmt_key."--".$sgmt_val."
".$invr_cont."
"; foreach($rule_rslt as $rule_key => $rule_val) { // echo "
RULE KEY ".$rule_key." RULE VAL ".$rule_val; $mystring=$rule_key; $findme=" of "; $vrag_type="Conversatievraag"; $pos = strpos($mystring, $findme,0); if ($pos !== false) { $sw_vrag="1"; $vrag_type="Keuzevraag"; // echo "The string '$findme' was found in the string '$mystring'"; // echo " and exists at position $pos"; } else { // echo "The string '$findme' was not found in the string '$mystring'"; } $sinvr_bzv1=str_replace(" ","+" ,$invr_bzv1); $sinvr_rchs=str_replace(" ","+" ,$invr_rchs); $rule_text=str_replace("%%",$invr_bzv1,$rule_key); $rule_text=str_replace("invrbzv1",$invr_bzv1,$rule_text); // $rule_text=str_replace("%"," of ",$rule_key); $srule_text=str_replace(" ","+",$rule_text); // $lrule_text="".$rule_text.""; $lrule_text="".$rule_text.""; echo ""; // echo ""; $vrag_rslt=xtrt_xxxx($rule_text,"nederlands","vrag",8); if (count($vrag_rslt) == 0) { // echo "
COUNT VRAG RSLT NULL".count($vrag_rslt); // echo ""; } if (count($vrag_rslt) > 0) { // echo "
COUNT VRAG RSLT ".count($vrag_rslt); ksort($vrag_rslt); foreach($vrag_rslt as $vrag_key => $vrag_val) { // echo "
".$vrag_type." ".$vrag_key." VRAG VAL ".$vrag_val; $vrag_dtls=explode("!!",$vrag_key); $vrag_domn=$vrag_dtls[2]; // echo "
".$vrag_type." VRAG DOMN ".$vrag_domn; $vrag_lnks=$vrag_dtls[3]; $vrag_rchs=$vrag_dtls[4]; if ($vrag_domn != $invr_bzv1) { // echo ""; } } } } } } } exit; ?>
".$vrag_type." ".$lrule_text."
".$lrule_text."
".$rule_key."
".$vrag_type." ".$vrag_lnks."_".$vrag_rchs."
> > > > > > > > >
Utterance
Previous response