return $this->occurences; } } // Start Benchmark $timer_start = microtime(true); // Adding Dictionaries $text = ''; if ($_POST['better_eng_dict'] == "yes") { include "../dictionaries/english.php"; $text .= ' ' . $english; } if ($_POST['better_spa_dict'] == "yes") { include "../dictionaries/spanish.php"; $text .= ' ' . $spanish; } $a = new textFilter(); $a->add_dictionary($text)->made_from($made_from_as_array)->set_max_words($max_words)->get_words(); if ($_POST['better_sentence'] == "yes") { $a->sentencecase(); } if ($_POST['better_somesentence'] == "yes") { $a->somesentence(); } if ($_POST['better_uppercase'] == "yes") { $a->uppercase(); } $resultados = $a->get_results(); // End Benchmark $timer_end = microtime(true) - $timer_start; echo '<p class="sizelabel">' . count($resultados) . ' Results (' . number_format($timer_end, 2) . ' seconds) set at ' . $bettersize . 'px</p>'; echo '<p style="font-size: ' . $bettersize . 'px;';
if ($_POST['eng_dict'] == "yes") { include "../dictionaries/english.php"; $text .= ' ' . $english; } 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']);
// Define Font Size or use default $filtersize = 40; if (isset($_POST['filtersize']) && !empty($_POST['filtersize'])) { $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']);