cvs: phpdoc /scripts spell-checker.php

From: Date: Fri, 13 Aug 2004 22:33:03 +0000
Subject: cvs: phpdoc /scripts spell-checker.php
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969363161@lists.php.net to get a copy of this message
dave Fri Aug 13 18:33:03 2004 EDT Modified files: /phpdoc/scripts spell-checker.php Log: - Add a word count. http://cvs.php.net/diff.php/phpdoc/scripts/spell-checker.php?r1=1.1&r2=1.2&ty=u Index: phpdoc/scripts/spell-checker.php diff -u phpdoc/scripts/spell-checker.php:1.1 phpdoc/scripts/spell-checker.php:1.2 --- phpdoc/scripts/spell-checker.php:1.1 Fri Aug 13 00:59:25 2004 +++ phpdoc/scripts/spell-checker.php Fri Aug 13 18:33:03 2004 @@ -40,6 +40,7 @@ $element = ''; $current_file = ''; +$word_count = 0; /* prompt a user and return the response */ function read_line($prompt) { @@ -76,7 +77,7 @@ /* spell check a chunk of data */ function check_data($xml, $data) { - global $element, $dict, $check_tags, $current_file; + global $element, $dict, $check_tags, $current_file, $word_count; if (!in_array($element, $check_tags)) return; @@ -90,6 +91,7 @@ if (trim($word) == '' || is_numeric($word) || preg_match('/[^a-z]/', $word)) continue; + $word_count++; $word = strtolower($word); if (!pspell_check($dict, $word)) { @@ -161,5 +163,5 @@ globbetyglob("$phpdoc$lang", 'check_file'); pspell_save_wordlist($dict); echo "Wordlist saved.\n"; - +echo "Processed $word_count words.\n"; ?>

« previous php.doc (#969363161) next »