Пример #1
0
function SearchInDeriv($strr)
{
    $words = array();
    $flag = false;
    $doneflag = false;
    $femaleflag = false;
    $pluflag = false;
    $twoflag = false;
    $adjflag = false;
    $ownflag = false;
    $str = Withoutquot($strr);
    $ssss = "";
    $sss = $str;
    $cc = "";
    $ss = substr($str, 0, 4);
    $dd = array();
    $flag = FoundInDeriv($sss);
    if ($flag == true) {
        $dd = ReturnDeriv($sss);
        for ($k = 0; $k < count($dd); $k++) {
            array_push($words, $dd[$k]);
        }
    }
    if ($flag == false) {
        if ($ss == "ال") {
            $doneflag = true;
            $sss = substr($str, 4, strlen($str) - 4);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 2);
        if ($ss == "ب") {
            $doneflag = true;
            $sss = substr($str, 2, strlen($str) - 2);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "في");
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 2);
        if ($ss == "ف") {
            $doneflag = true;
            $sss = substr($str, 2, strlen($str) - 2);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 2);
        if ($ss == "ل") {
            $doneflag = true;
            $sss = substr($str, 2, strlen($str) - 2);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "إلى");
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 6);
        if ($ss == "بال") {
            $doneflag = true;
            $sss = substr($str, 6, strlen($str) - 6);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "في");
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 4);
        if ($ss == "لل") {
            $doneflag = true;
            $sss = substr($str, 4, strlen($str) - 4);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "إلى");
            $dd = ReturnDeriv($sss);
            for ($k = 0; $k < count($dd); $k++) {
                array_push($words, $dd[$k]);
            }
        }
    }
    if ($flag == false && $doneflag == true) {
        $doneflag = false;
        //$sss=$str;
        //$ssss=$str;
        $ss = substr($sss, strlen($sss) - 6, 6);
        if ($ss == "تان") {
            $ssss = substr($sss, 0, strlen($sss) - 6);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        if ($ss == "تين") {
            $ssss = substr($sss, 0, strlen($sss) - 6);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        $ss = substr($sss, strlen($sss) - 4, 4);
        if ($ss == "ان" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $twoflag = true;
        }
        if ($ss == "ين" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $twoflag = true;
        }
        if ($ss == "ون") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $pluflag = true;
        }
        if ($ss == "ات") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $pluflag = true;
            $femaleflag = true;
        }
        if ($ss == "تا") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        $ss = substr($sss, strlen($sss) - 2, 2);
        if ($ss == "ة") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $femaleflag = true;
        }
        if ($ss == "ا" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $twoflag = true;
        }
        if ($ss == "و" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $pluflag = true;
        }
        if ($ss == "ي" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $ownflag = true;
        }
        if ($ss == "ى" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $ownflag = true;
        }
        $flag = FoundInDeriv($ssss);
        if ($flag == true && $femaleflag == true) {
            array_push($words, "مؤنث");
        }
        if ($flag == true && $pluflag == true) {
            array_push($words, "الذين");
        }
        if ($flag == true && $twoflag == true) {
            array_push($words, "هذان");
        }
        if ($flag == true && $ownflag == true) {
            array_push($words, "أنا");
        }
    }
    $cc = substr($sss, strlen($sss) - 2, 2);
    if ($flag == false) {
        if ($cc == "ه") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هو");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ك") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنتَ");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ي") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ى") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنا");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 4, 4);
    if ($flag == false) {
        if ($cc == "هم") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "الذين");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "هن") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "اللآئى");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "نا") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "نحن");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ته") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هو");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تك") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنتَ");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تي") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تى") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تي") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                if (GetWordCat($ssss) != "أفعال شائعة") {
                    $dd = ReturnDeriv($ssss);
                    for ($k = 0; $k < count($dd); $k++) {
                        array_push($words, $dd[$k]);
                    }
                    array_push($words, "مؤنث");
                    array_push($words, "أنا");
                } else {
                    array_push($words, "الماضى");
                    $dd = ReturnDeriv($ssss);
                    for ($k = 0; $k < count($dd); $k++) {
                        array_push($words, $dd[$k]);
                    }
                }
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تى") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                if (GetWordCat($ssss) != "أفعال شائعة") {
                    $dd = ReturnDeriv($ssss);
                    for ($k = 0; $k < count($dd); $k++) {
                        array_push($words, $dd[$k]);
                    }
                    array_push($words, "مؤنث");
                    array_push($words, "أنا");
                } else {
                    array_push($words, "الماضى");
                    $dd = ReturnDeriv($ssss);
                    for ($k = 0; $k < count($dd); $k++) {
                        array_push($words, $dd[$k]);
                    }
                }
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ها") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هذه");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 6, 6);
    if ($flag == false) {
        if ($cc == "هما") {
            $ssss = substr($sss, 0, strlen($sss) - 6);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هذان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "يا") {
            $ssss = substr($sss, 0, strlen($sss) - 6);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنا");
                array_push($words, "هذان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تها") {
            $ssss = substr($sss, 0, strlen($sss) - 6) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هذه");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تنا") {
            $ssss = substr($sss, 0, strlen($sss) - 6) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "نحن");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهم") {
            $ssss = substr($sss, 0, strlen($sss) - 6) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "الذين");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهن") {
            $ssss = substr($sss, 0, strlen($sss) - 6) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "اللآئى");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تكم") {
            $ssss = substr($sss, 0, strlen($sss) - 6) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "أنتم");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 8, 8);
    if ($flag == false) {
        if ($cc == "تهما") {
            $ssss = substr($sss, 0, strlen($sss) - 8) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهما") {
            $ssss = substr($sss, 0, strlen($sss) - 8);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "مؤنث");
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تيا") {
            $ssss = substr($sss, 0, strlen($sss) - 8) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "مؤنث");
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تيا") {
            $ssss = substr($sss, 0, strlen($sss) - 8);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                for ($k = 0; $k < count($dd); $k++) {
                    array_push($words, $dd[$k]);
                }
                array_push($words, "مؤنث");
                array_push($words, "أنا");
                array_push($words, "هاتان");
            }
        }
    }
    return $words;
}
Пример #2
0
function SearchInDeriv($str)
{
    $words = array();
    $flag = false;
    $doneflag = false;
    $femaleflag = false;
    $pluflag = false;
    $twoflag = false;
    $adjflag = false;
    $ownflag = false;
    $str = Withoutquot($str);
    $ssss = "";
    $sss = $str;
    $cc = "";
    $ss = substr($str, 0, 2);
    $dd = array();
    $flag = FoundInDeriv($sss);
    if ($flag == true) {
        $dd = ReturnDeriv($sss);
        $words = array_push($words, $dd);
    }
    if ($flag == false) {
        if ($ss == "ال") {
            $doneflag = true;
            $sss = substr($str, 2, strlen($str) - 2);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 1);
        if ($ss == "ب") {
            $doneflag = true;
            $sss = substr($str, 1, strlen($str) - 1);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "في");
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 1);
        if ($ss == "ف") {
            $doneflag = true;
            $sss = substr($str, 1, strlen($str) - 1);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 1);
        if ($ss == "ل") {
            $doneflag = true;
            $sss = substr($str, 1, strlen($str) - 1);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "إلى");
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 3);
        if ($ss == "بال") {
            $doneflag = true;
            $sss = substr($str, 3, strlen($str) - 3);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "في");
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false) {
        $ss = substr($str, 0, 2);
        if ($ss == "لل") {
            $doneflag = true;
            $sss = substr($str, 2, strlen($str) - 2);
            $flag = FoundInDeriv($sss);
        }
        if ($flag == true) {
            array_push($words, "إلى");
            $dd = ReturnDeriv($sss);
            $words = array_push($words, $dd);
        }
    }
    if ($flag == false && $doneflag == true) {
        $doneflag = false;
        //$sss=$str;
        $ssss = $str;
        $ss = substr($sss, strlen($sss) - 3, 3);
        if ($ss == "تان") {
            $ssss = substr($sss, 0, strlen($sss) - 3);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        if ($ss == "تين") {
            $ssss = substr($sss, 0, strlen($sss) - 3);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        $ss = substr($sss, strlen($sss) - 2, 2);
        if ($ss == "ان" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $twoflag = true;
        }
        if ($ss == "ين" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $twoflag = true;
        }
        if ($ss == "ون") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $pluflag = true;
        }
        if ($ss == "ات") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $pluflag = true;
            $femaleflag = true;
        }
        if ($ss == "تا") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $femaleflag = true;
            $twoflag = true;
            $doneflag = true;
        }
        $ss = substr($sss, strlen($sss) - 1, 1);
        if ($ss == "ة") {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $femaleflag = true;
        }
        if ($ss == "ا" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $twoflag = true;
        }
        if ($ss == "و" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $pluflag = true;
        }
        if ($ss == "ي" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $ownflag = true;
        }
        if ($ss == "ى" && $doneflag == false) {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $ownflag = true;
        }
        $flag = FoundInDeriv($ssss);
        if ($flag) {
            if (GetWordCat($ssss) == "أفعال شائعة") {
                $twoflag = false;
                $pluflag = false;
                $femaleflag = false;
                array_push($words, "الماضى");
            }
        }
        if ($flag == true) {
            $dd = ReturnDeriv($ssss);
            $words = array_push($words, $dd);
            $adjflag = isAdj($ssss);
            if ($adjflag == true) {
                $femaleflag = false;
                $pluflag = false;
                $twoflag = false;
                $ownflag = false;
            }
        }
        if ($flag == true && $femaleflag == true) {
            array_push($words, "مؤنث");
        }
        if ($flag == true && $pluflag == true) {
            array_push($words, "الذين");
        }
        if ($flag == true && $twoflag == true) {
            array_push($words, "هذان");
        }
        if ($flag == true && $ownflag == true) {
            array_push($words, "أنا");
        }
    }
    $cc = substr($sss, strlen($sss) - 1, 1);
    if ($flag == false) {
        if ($cc == "ه") {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هو");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ك") {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنتَ");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ي") {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ى") {
            $ssss = substr($sss, 0, strlen($sss) - 1);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنا");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 2, 2);
    if ($flag == false) {
        if ($cc == "هم") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "الذين");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "هن") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "اللآئى");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "نا") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "نحن");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ته") {
            $ssss = substr($sss, 0, strlen($sss) - 2) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هو");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تك") {
            $ssss = substr($sss, 0, strlen($sss) - 2) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنتَ");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تي") {
            $ssss = substr($sss, 0, strlen($sss) - 2) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تى") {
            $ssss = substr($sss, 0, strlen($sss) - 2) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنا");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تي") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                if (GetWordCat($ssss) != "أفعال شائعة") {
                    $dd = ReturnDeriv($ssss);
                    $words = array_push($words, $dd);
                    array_push($words, "مؤنث");
                    array_push($words, "أنا");
                } else {
                    array_push($words, "الماضى");
                    $dd = ReturnDeriv($ssss);
                    $words = array_push($words, $dd);
                }
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تى") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                if (GetWordCat($ssss) != "أفعال شائعة") {
                    $dd = ReturnDeriv($ssss);
                    $words = array_push($words, $dd);
                    array_push($words, "مؤنث");
                    array_push($words, "أنا");
                } else {
                    array_push($words, "الماضى");
                    $dd = ReturnDeriv($ssss);
                    $words = array_push($words, $dd);
                }
            }
        }
    }
    if ($flag == false) {
        if ($cc == "ها") {
            $ssss = substr($sss, 0, strlen($sss) - 2);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هذه");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 3, 3);
    if ($flag == false) {
        if ($cc == "هما") {
            $ssss = substr($sss, 0, strlen($sss) - 3);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هذان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "يا") {
            $ssss = substr($sss, 0, strlen($sss) - 3);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنا");
                array_push($words, "هذان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تها") {
            $ssss = substr($sss, 0, strlen($sss) - 3) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هذه");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تنا") {
            $ssss = substr($sss, 0, strlen($sss) - 3) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "نحن");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهم") {
            $ssss = substr($sss, 0, strlen($sss) - 3) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "الذين");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهن") {
            $ssss = substr($sss, 0, strlen($sss) - 3) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "اللآئى");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تكم") {
            $ssss = substr($sss, 0, strlen($sss) - 3) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "أنتم");
            }
        }
    }
    $cc = substr($sss, strlen($sss) - 4, 4);
    if ($flag == false) {
        if ($cc == "تهما") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تهما") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "مؤنث");
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تيا") {
            $ssss = substr($sss, 0, strlen($sss) - 4) + "ة";
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "مؤنث");
                array_push($words, "هاتان");
            }
        }
    }
    if ($flag == false) {
        if ($cc == "تيا") {
            $ssss = substr($sss, 0, strlen($sss) - 4);
            $flag = FoundInDeriv($ssss);
            if ($flag == true) {
                $dd = ReturnDeriv($ssss);
                $words = array_push($words, $dd);
                array_push($words, "مؤنث");
                array_push($words, "أنا");
                array_push($words, "هاتان");
            }
        }
    }
    for ($i = 0; i < count($words); $i++) {
        $words[$i] = FindInDic($words[$i]);
    }
    if ($flag == false) {
        array_push($words, $str);
    }
    return $words;
}