}
if ($_POST['spa_dict'] == "yes") {
    include "../dictionaries/spanish.php";
    $text .= ' ' . $spanish;
    # $alldictionaries = $english.' '.$spanish;
}
if ($_POST['deva_dict'] == "yes") {
    include "../dictionaries/devanagari.php";
    $text .= ' ' . $devangari;
    # $alldictionaries = $english.' '.$spanish;
}
// Do Stuff
$a = new textFilter();
$a->getText($text);
if (!empty($_POST['filterglyphs'])) {
    $a->madefrom($_POST['filterglyphs']);
}
if (!empty($_POST['having'])) {
    $a->having($_POST['having']);
}
if (!empty($_POST['also_having'])) {
    $a->having($_POST['also_having']);
}
if (!empty($_POST['also_having_more'])) {
    $a->having($_POST['also_having_more']);
}
if (!empty($_POST['not_having'])) {
    $a->not_having($_POST['not_having']);
}
if (!empty($_POST['also_not_having'])) {
    $a->not_having($_POST['also_not_having']);
    $filtersize = $_POST['filtersize'];
}
// Define Minimun and Maximun number of glyphs per word
$minglyphs = 8;
$maxglyphs = 8;
if (isset($_POST['minglyphs']) && !empty($_POST['minglyphs'])) {
    $minglyphs = $_POST['minglyphs'];
}
if (isset($_POST['maxglyphs']) && !empty($_POST['maxglyphs'])) {
    $maxglyphs = $_POST['maxglyphs'];
}
// Do Stuff
$a = new textFilter();
$a->AddSourceText($text, $minglyphs, $maxglyphs);
if (!empty($_POST['madefrom'])) {
    $a->madefrom($_POST['madefrom']);
}
if (!empty($_POST['measures'])) {
    $a->AddMeasures($_POST['measures']);
}
if (!empty($_POST['kerning'])) {
    $a->AddKerning($_POST['kerning']);
}
if (!empty($_POST['having_one'])) {
    $a->having($_POST['having_one']);
}
if (!empty($_POST['having_two'])) {
    $a->having($_POST['having_two']);
}
if (!empty($_POST['having_three'])) {
    $a->having($_POST['having_three']);