Skip to content

Instantly share code, notes, and snippets.

@AboliOneStar
Last active July 6, 2020 18:24
Show Gist options
  • Save AboliOneStar/e8681a12195809f4e9fbc81772485178 to your computer and use it in GitHub Desktop.
Save AboliOneStar/e8681a12195809f4e9fbc81772485178 to your computer and use it in GitHub Desktop.
با این سورس میتونید دو تا جمله رو با هم مقایسه کنید ببینید معنیشون یکی هست یا نه ساده هست ولی جالب
<?php
// TG: t.me/Pgming
$r = false;
if(isset($_POST['sbm'])){
$i1e = preg_split("/[\s,.-]+/", $_POST['i1']);
$i2e = preg_split("/[\s,.-]+/", $_POST['i2']);
$len = count($i1e);
$len1x = $len/2;
$match = 0;
foreach ($i1e as $f1) {
if(in_array($f1,$i2e)) {
$match = $match + 1;
}
}
$r = $match > $len1x ? true:false;
}
?>
<html>
<head>
<meta charset="utf8">
<title>میو</title>
</head>
<body style="text-align: center">
<?php if($r) {
echo '<h1 style="color:green">مشابه است :)</h1>';
} else{
echo '<h1 style="color:red">مشابه نیست :(</h1>';
} ?>
<form action="" method="post">
<input type="text" name="i1" placeholder="جمله اصلی رو بزن" /><br>
<input type="text" name="i2" placeholder="جمله مشابه رو بزن" /><br>
<input type="submit" name="sbm" value="مقایسه" />
</form>
</body>
</html>
@AboliOneStar
Copy link
Author

هن ؟ :|

@mrhalix
Copy link

mrhalix commented Jun 2, 2017

WTF ?

@mrhalix
Copy link

mrhalix commented Jun 2, 2017

:boos:

@treetwoone
Copy link

treetwoone commented Jun 29, 2017

تو يا مفهوم "هم معني" بودن دوتا جمله رو نميدوني
يا هوش مصنوعي نميدوني چيه!
اسكرين بگير بزار چنل ملت يكم شاد بشن
ولی خب در کل من نوکرتم هستم ♥

@masthisis
Copy link

عجب ؟؟؟؟؟؟؟؟؟؟؟

@masthisis
Copy link

masthisis commented Jun 29, 2017

با اجازه اسکرین گرفتم بفرستم با دوستان به کص ننم با هم بخندیم...:)

@AboliOneStar
Copy link
Author

AboliOneStar commented Jul 8, 2017

کار خوبی میکنی :))

@AboliOneStar
Copy link
Author

یادم نمیاد گفته باشم این هوش مصنوعیه
گفتم خیلیا فک میکنن واسه چنین کاری نیاز به هوش مصنوعیه !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment