function ScandinavianVowConAnalyzer($MaxAvgScore = 2.5, $MaxWordScore = 5.0, $MaxBadPercent = 20.0, $BadWordLimit = 3.5)
 {
     parent::VowConAnalyzer($MaxAvgScore, $MaxWordScore, $MaxBadPercent, $BadWordLimit);
     $this->AddVowels('זרוֶ״ֵ');
     # norwegian/danish
 }
Ejemplo n.º 2
0
            <th>
              <a id="a5" href="javascript:SortTable('a5',4,'N');">Pro-Words [only]</a>
            </th>
          </tr>
        </thead>
        <tbody>
          <?php 
$smptxt = strtolower(preg_replace("/[^a-zA-Z\\s]/", " ", $badtxt . $goodtxt));
$articles = array(" the ", " an ", " or ", " of ", " to ", " as ", " are ", " and ", " in ", " a ", " the ", " of ", " to ", " and ", " in ", " that ", " from ", " is ", " now ", " you ", " by ", " for ", " have ", " has ", " than ", " on ", " these ", " more ", " was ", " our ", " know ", " out ", " had ", " we ", " or ", " an ", " me ", " its ", " c ");
$smptxt = str_ireplace($articles, " ", $smptxt);
$cmnwords = array_count_values(explode(' ', $smptxt));
arsort($cmnwords);
$badtxt = strtolower($badtxt);
$goodtxt = strtolower($goodtxt);
require_once './vowcon/VowCon.php';
$v = new VowConAnalyzer();
//echo 'res: '.$v->WordIsValid('bugler');
foreach ($cmnwords as $key => $value) {
    if ($v->WordIsValid($key)) {
        $blank = 0;
        if (strlen($key) != 1 && strlen($key) != 0) {
            $bgcolor = "white";
            echo "<tr>";
            if (strpos($badtxt, $key) && (strpos($badtxt, $key) && strpos($goodtxt, $key)) == false) {
                $bgcolor = "red";
                echo "<td style=\"color:{$bgcolor};\">{$key} ~ {$value}</td>";
            } else {
                $blank++;
            }
            if (strpos($badtxt, $key) && strpos($goodtxt, $key)) {
                for ($i = 0; $i < $blank; $i++) {