"; echo "

Semanta

Semanta's digital representation

"; echo "Please say or type your utterrance of uiting
"; require_once("../../../conv.php"); require_once("../../../xtrt-aiml-func.php"); require_once("../../../bepl-taal-func.php"); require_once ("../../../bild-wiki-func.php"); require_once ("../../../bepl-sgmt-func.php"); require_once ("../../../bepl-spec-func.php"); require_once ("../../../config-smta.php"); require_once ("../../../chck-infr-func.php"); require_once ("../../../chbt-date-func.php"); require_once ("../../../gram-rule-func.php"); require_once ("../../../smta-tlkd-func-0017.php"); require_once ("../../../tlkd-smts-func.php"); require_once ("../../../taal-ipcd-func.php"); require_once ("../../../text-isrt-func.php"); require_once ("../../../xtrt-xxxx-func.php"); require_once ("../../../enrc-text-func.php"); require_once ("../../../slct-tabl.php"); if ($invr_vgpt == "semanta") { echo "
Ik kan van alles vertellen...... Het gebruik is toch de beste leermeester. Dus zeg iets of tik iets en leer Semanta kennen. U converseert met Semanta als mens of als humanoid.
"; } //////////// echo ""; $say=str_replace("+"," ",$say); $lgroet=chbt_date("IT@1@2@".$invr_taal."@".$invr_bzkr); $curr_jaar=$lgroet[jaar]; // print_r($lgroet); $datm_hour=$lgroet[uur]; ///////// if ($invr_taal == null) { $invr_taal="nederlands"; } if ($invr_corp == null) { $invr_corp="semanta"; } if ($invr_vgpt == null) { $invr_vgpt="semantus"; } if ($invr_name == null) { $invr_name="gast"; } if ($invr_bzkr == null) { $invr_bzkr="bezoeker"; } ///////// if ($datm_hour == 23 or $datm_hour == 0) { $invr_bzv2="Goede nacht Hoeft u nog niet naar bed? Heeft u nachtdienst"; } if ($datm_hour == 3 or $datm_hour == 4 ) { $invr_bzv2= "Goede nacht U bent er vroeg bij heeft u ochtenddienst"; } if ($datm_hour == 1 or $datm_hour == 2 ) { $invr_bzv2= "Goede nacht Het is tijd om te gaan slapen"; } if ($datm_hour ==5 or $datm_hour == 6 ) { $invr_bzv2= "Goede morgen effe p..n en dan weer terug of toch maar opblijven "; } if ($datm_hour ==7 or $datm_hour == 8) { $invr_bzv2= "Goede morgen Goed geslapen waar bestaat uw ontbijt uit"; } if ($datm_hour == 9 or $datm_hour == 10) { $invr_bzv2= "Goede morgen Een nieuwe dag met nieuwe kansen. Wat gaat u vandaag doen"; } if ($datm_hour == 11 or $datm_hour == 12 ) { $invr_bzv2= "Goede morgen Even volhouden nog en dan kunt u gaan lunchen"; } if ($datm_hour == 13 or $datm_hour == 14) { $invr_bzv2= "Goede middag Hoe was de lunch vandaag?"; } if ($datm_hour == 15 or $datm_hour == 16) { $invr_bzv2= "Goede middag heeft u al een kopje thee gehad?"; } if ($datm_hour == 17 or $datm_hour == 18) { $invr_bzv2 = "Goede avond bent u goed thuisgekomen heeft u al gegeten"; } if ($datm_hour == 19 or $datm_hour == 20) { $invr_bzv2 = "Goede avond Hoe was het nieuws nog spannende zaken?"; } if ($datm_hour == 21 or $datm_hour == 22 ) { $invr_bzv2= "Goede avond als u TV kijkt waar kijkt u dan naar"; } if ($invr_taal == "nederlands") { echo "
Het is rond ".$datm_hour." uur.
".$invr_bzv2."
"; } else { echo ""; } // echo "
INVR VGPT ".$invr_vgpt; /////////////////// ?>
> > > > > > > > >
". $invr_bzv2."
INVR BZV1 ".$invr_bzv1." INVR BZV2 ".$invr_bzv2. " INVR CHBT ".$invr_chbt." SGMT KEY ".$sgmt_key; $sinvr_bzv1=""; $invr_bzv1=trim($invr_bzv1); foreach($sgmt_rslt as $sgmt_key => $sgmt_val) { if ($invr_bzv2 != null) { $sinvr_bzv2=str_replace(" ","+",$invr_bzv2); $invr_bzv1=$sgmt_key." betekent ".$sinvr_bzv2; } $invr_bzv1=trim($sgmt_key); $sinvr_bzv1=str_replace(" ","+",$sgmt_key); echo "
".$sgmt_key; echo "

Humanoids
"; $aiml_rslt=xtrt_aiml($sgmt_key, "wiml"); print_r($aiml_rslt); $sw=0; echo ""; /////////////////// if (count($aiml_rslt) > 0) { echo "
"; // echo "
"; echo ""; echo "
"; foreach($aiml_rslt as $aiml_key => $aiml_val) { // echo "
AIML KEY ".$aiml_key; $aiml_dtls=explode("@",$aiml_key); // print_r($aiml_dtls); $aiml_perc=$aiml_dtls[0]; $aiml_ptrn=$aiml_dtls[1]; // echo "
AIML PTRN ".$aiml_ptrn; $aiml_tmpl=$aiml_dtls[2]; $aiml_file=$aiml_dtls[3]; $aiml_full=str_replace("*",$paiml_ptrn,$aiml_tmpl); $aiml_strl=ceil(strlen($aiml_ptrn)/strlen($invr_bzv1)); $aiml_perc=ceil($aiml_perc); $paiml_ptrn="".$aiml_ptrn.""; $saiml_ptrn=str_replace(" ","+",$aiml_ptrn); $saiml_full=str_replace(" ","+",$aiml_full); $aiml_file=str_replace(","," ",$aiml_file); $laiml_file=""; // echo "
AIML FILE ".$aiml_file; $file_dtls=explode(" ",$aiml_file); foreach($file_dtls as $file_key => $file_val) { if ($file_val != null and strlen($file_val) > 4) { $lfile_val="".$file_val.""; $laiml_file=$laiml_file." ".$lfile_val; } } $laiml_file=trim($laiml_file); // echo "
LAIML FILE ".$laiml_file; $laiml_full="
".substr($aiml_full,0,64)."......
"; // echo ""; // echo ""; echo ""; // echo ""; foreach($bzv1_dtls as $bzv1_key => $bzv1_val) { if (strlen($bzv1_val) > 4) { // echo "
BZV1 VAL ".$bzv1_val; $aiml_perc=($aiml_perc*$aiml_strl); $pbzv1_val="".$bzv1_val.""; $aiml_full=str_replace($bzv1_val,$pbzv1_val,$aiml_full); } } if ($sw < 4) { $aiml_file=str_replace(","," ",$aiml_file); $laiml_file=""; // echo "
AIML FILE ".$aiml_file; $file_dtls=explode(" ",$aiml_file); foreach($file_dtls as $file_key => $file_val) { if ($file_val != null and strlen($file_val) > 4) { $lfile_val="".$file_val.""; $laiml_file=$laiml_file." ".$lfile_val; } } $laiml_file=trim($laiml_file); // echo "
LAIML FILE ".$laiml_file; $sw=$sw+1; $laiml_ptrn="".$paiml_ptrn.""; $laiml_full="".$aiml_full.""; // echo ""; if ($prelt != $aiml_perc) { $prelt= $aiml_perc; // echo ""; } } } } /////////////////// echo "
Bruikbaarheid
Uiting
Resultaat
Tags
Bruikbaarheid
Tags
".substr($aiml_full,0,64).".....
".$aiml_perc."
".$laiml_full."
".$laiml_file."
".$laiml_full."
".$laiml_file."
".$laiml_full."
".$aiml_perc."
".$laiml_ptrn."
".$laiml_full."
".$laiml_file."
".$aiml_perc."
".$laiml_ptrn."
".$laiml_full."
".$laiml_file."
"; // $chbt_array="eddy,ed,receptioniste,semanta,semantus"; $chbt_array="semanta"; $chbt_dtls=explode(",",$chbt_array); // print_r($chbt_dtls); foreach($chbt_dtls as $chbt_key => $chbt_val) { $invr_chbt=$chbt_val; // echo "
INVR BZV1 ".$invr_bzv1." INVR BZV2 ".$invr_bzv2. " INVR CHBT ".$invr_chbt." SGMT KEY ".$sgmt_key; ///////////// if ($invr_chbt== "semanta") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSBv8xm5QeZbKGNfX_y5JsW4qBIfqxKZI9dXUcmEL-XrQKxQuhpiBgI58CUXo6a_0aM~&input='.$sinvr_bzv1; } $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSBv8xm5QeZbKHi15Ah0Mv-bavFOxjBHeu2uWYxc0qAp9nTmyR_bQaCB21ZQZQwpUic~&input='.$sinvr_bzv1; if ($invr_chbt == "batterybot") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSCsLG5hvGLY8P5ldk_3njHaNOoBSD49EvPEZtWDvdWFcB4LGf82bCEl3_D64mxW-tRp9rI_1dsWOQ~~&input='.$sinvr_bzv1; } if ($invr_chbt == "bioloog") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSCcAWGQqz51T71PSLlY12rnqBIfqxKZI9dXUcmEL-XrQKxQuhpiBgI58CUXo6a_0aM~&input='.$sinvr_bzv1; } if ($invr_chbt == "eddy" or $invr_chbt == "ed") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSDqbJU1EhZMUanRKaM64k16HxNhv2_T_cIiXpCKlLcJBEhByu3vPWq2pEuGWa0IiYY~&input='.$sinvr_bzv1; } if ($invr_chbt == "grompy") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSBPFG2HoqgSItPZiWzE7catyHxjezgT-kpBFpW0wlR9e9h7OdWatEx39J1nPvl6mn8~&input='.$sinvr_bzv1; } if ($invr_chbt== "remko") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSC5zv3aee463ehkoIemxRssdjMG9ec6g_jvF4QpGCl88tQig-GWfTcX6UUTAMx4EZc~&input='.$sinvr_bzv1; } if ($invr_chbt== "receptioniste") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSCSumLi7_rfSS9UtHtEg1jzJmBQhQUkuw92Mwb15zqD-O8XhCkYKXzy1CKD4ZZ9NxfpRRMAzHgRlw~~&input='.$sinvr_bzv1; } if ($invr_chbt== "semmy") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSDaPFEsfR5CpW8r2BSmqgRQdjMG9ec6g_jvF4QpGCl88tQig-GWfTcX6UUTAMx4EZc~&input='.$sinvr_bzv1; } if ($invr_chbt== "semantus") { $url='https://api.pandorabots.com/talk?botkey=9qPG2YT4KSBv8xm5QeZbKHi15Ah0Mv-bavFOxjBHeu2uWYxc0qAp9nTmyR_bQaCB21ZQZQwpUic~&input='.$sinvr_bzv1; } //////////////////////////////////////// // echo "

".$invr_chbt; $ch = curl_init( $url ); # Setup request to send json via POST. $payload = json_encode( array( "customer"=> $data ) ); curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload ); curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json')); # Return response instead of printing. curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); # Send request. $result = curl_exec($ch); curl_close($ch); # Print response. // echo "
$result
"; $json = json_decode($result); // echo "
JSON
".$json; // print_r($json); // echo "
RESPONSE".$json; // echo "
JSON Entries ".count($json); echo ""; foreach($json as $json_key => $json_val) { // echo ">JSON EXPLOSIE "; if ($json_key == "responses") { if ($json_key == null) { echo "
STRING IS EMPTY "; } // echo ""; foreach($json_val as $files_key => $files_val) { $string=$files_val; $string = preg_replace ('/<[^>]*>/', ' ', $string); // ----- remove control characters ----- $string = str_replace("\r", '', $string); $string = str_replace("\n", ' ', $string); $string = str_replace("\t", ' ', $string); // ----- remove multiple spaces ----- $string = trim(preg_replace('/ {2,}/', ' ', $string)); // $files_splt=explode("%3E",urlencode($files_val)); // print_r($files_splt); // echo ""; // echo "
".urlencode(substr($files_val,0,26))."
"; if (substr($files_val,0,26) == "wat wilt u daarover zeggen") { $files_val="geen direct antwoord"; // echo ""; $sgmt_rslt=bepl_sgmt($invr_bzv1); foreach($sgmt_rslt as $rslt_key => $rslt_val) { $ssgmt_key=str_replace(" ","+",$rslt_key); // echo ""; } $educ_text=$invr_bzv1."+betekent+"; // echo ""; } else { $string=$files_val; $string = preg_replace ('./<[^>]*>/', ' ', $string); // ----- remove control characters ----- $string = str_replace("\r", '', $string); $string = str_replace("\n", ' ', $string); $string = str_replace("\t", ' ', $string); // ----- remove multiple spaces ----- $string = trim(preg_replace('/ {2,}/', ' ', $string)); $files_splt=explode("%0A",urlencode($files_val)); // print_r($files_splt); foreach($files_splt as $file_key => $file_val) { // echo ""; $file_val=str_replace("%3A+","",$file_val); if (substr($file_val,0,8) == "Bezoeker") { $file_val1=str_replace("Tutorials...","",$file_val);echo "
".$invr_chbt." ".$json_key."".$json_val."
".$invr_bzv1."
".$string."
".$files_val."
".$sgmt_key."
".$file_val."
"; echo ""; echo ""; echo "
Geen antwoord
".urldecode($file_val1)."
"; } if (substr($file_val,0,8) != "Bezoeker") { $file_val2=str_replace("Tutorials...","",$file_val); $file_valn=urldecode($file_val2); // echo "
FILE VAL ".$file_val." FILE _VALN ".$file_valn; $file_val3=explode("https:",$file_valn); $file_val4=explode("reset",$file_valn); // print_r($file_val3); $ssmta_http=str_replace(" ","+",$file_val3[1]); $smta_text=$file_val3[0]. $ssmta_text=str_replace(" ","+",$sgmt_key); $ssmta_tex=str_replace(" ","+",$smta_text); $smta_http=$file_val3[1]; // echo "
SMTA TEXT ".$smta_text."
SMTA HTTP ".$smta_http; // print_r($file_val3); if (smta_http !=null) { $ssmta_http=str_replace(" ","+",$smta_http); // $ssmta_http=str_replace("/url","",$ssmta_php); $smta_dtls=explode("//",$smta_text); print_r($smta_dtls); $smta_text=$smta_dtls[0]; $ssmta_text=str_replace(" ","+",$sgmt_key); $smta_rslt=$smta_dtls[1]; // $smta_rslt=trim($smta_rslt); $lsmta_rslt="".$smta_text.""; // echo "Ga naar de browser

".$lsmta_rslt."
"; echo "
".$sgmt_key."
".$lsmta_rslt."
"; //////// ?>
> > > > > > > > >
".$smta_text."
"; } if (smta_http ==null) { // echo "
".urldecode($file_val2)."
"; } if ($file_valn == "xreset") { // echo "
Er is geen passend antwoord voor ".$invr_bzv1."
"; } } } } } // echo "
".$string."
"; } } } } echo ""; ///////////// ?>

Program O AIML PHP Chatbot
Ik kan van alles vertellen...... Het gebruik is toch de beste leermeester. Dus zeg iets of tik iets en leer Semanta kennen. U converseert met Semanta als mens of als humanoid.
Hey!
 

$sgmt_val) { echo "
SGMT KEY ".$sgmt_key; $ssgmt_key=str_replace(" ","+",$sgmt_key); ?>

Program O Example GUI Page - HTML

size="48"/>