";
$bzv1_rslt=bepl_sgmt($invr_bzv1);
foreach($bzv1_rslt as $aiml_key => $aiml_val)
{
$qstn_rslt=xtrt_aiml($aiml_key);
echo "
AIML KEY ".$aiml_key;
if ($sw == 0)
{
$sw=1;
$tmpl_dspl=substr($aiml_tmpl,0,64);
$ptrn_dspl=$aiml_ptrn;
echo "".$aiml_aiml." | ".$ptrn_perc."% ".$tmpl_perc."% | ".$aiml_ptrn." ".substr($aiml_tmpl,0,64)."... |
";
}
if ($sw ==1 and count($qstn_rslt) > 1)
{
$aiml_itms=explode("@",$aiml_key);
// print_r($aiml_itms);
$aiml_ptrn=$aiml_itms[1];
$aiml_tmpl=$aiml_itms[2];
$aiml_aiml=$aiml_itms[3];
if($aiml_aiml == null)
{
$aiml_aiml="generiek";
}
similar_text($aiml_ptrn,$invr_bzv1, $ptrn_perc);
similar_text($aiml_tmpl,$invr_bzv1, $tmpl_perc);
// echo "
AIML PTRN ".$aiml_ptrn."AIML TMPL ".$aiml_tmpl;
$ptrn_perc=round ($ptrn_perc, 0);
$tmpl_perc=round ($tmpl_perc, 0);
if($ptrn_perc > 0)
{
$antw_tabl[$tmpl_perc."@".$ptrn_perc."@".$aiml_tmpl."@".$aiml_ptrn]=$antw_tabl[$tmpl_perc."@".$ptrn_perc."@".$aiml_tmpl."@".$aiml_ptrn]+1;
$caiml_aiml= "".$aiml_aiml."";
if ($ptrn_perc == "100")
{
$tmpl_dspl=substr($aiml_tmpl,0,64);
$ptrn_dspl=$aiml_ptrn;
// echo "".$aiml_aiml." | ".$ptrn_perc."% ".$tmpl_perc."% | ".$aiml_ptrn."
| ".substr($aiml_tmpl,0,128)."... |
";
}
else
{
$tmpl_dspl=substr($aiml_tmpl,0,64);
$ptrn_dspl=$aiml_ptrn;
// echo "".$aiml_aiml." | ".$ptrn_perc."% ".$tmpl_perc."% | ".$aiml_ptrn." | ".substr($aiml_tmpl,0,64)."... |
";
}
}
}
}
krsort($antw_tabl);
// print_r($antw_tabl);
$sw=0;
foreach($antw_tabl as $antw_key => $antw_val)
{
$antw_dtls=explode("@",$antw_key);
$antw_tmpc=$antw_dtls[0];
$antw_ptpc=$antw_dtls[1];
$antw_ptrn=$antw_dtls[2];
$antw_tmpl=$antw_dtls[3];
if ($sw ==0)
{
$sw=1;
echo "".$antw_tmpc."% ".$antw_ptpc."% | ".$antw_tmpl." | ".substr($antw_ptrn,0,128)."... |
";
}
}
echo "
";
echo "