My favorites | Sign in
Project Logo
                
Details: Show all Hide all

Earlier this year

  • Jun 01, 2009
    issue 6 (word_count() is not accurate when counting sentences with qu...) reported by jamestse   -   Here's the test case: --- public function testWordCountWithQuotes() { $textStats = new TextStatistics(); $text = "\"There should be seven words,\" said Joe"; $expected = 7; $actual = $textStats->word_count($text); // value is 8 $this->assertEqual($actual, $expected); } --- Here's a possible fix: In the clean_text(), replace: --- $strText = preg_replace('/[,:;()-]/', ' ', $strText); // Replace commans, hyphens etc (count them as spaces) --- with: --- $strText = preg_replace('/[",:;()-]/', ' ', $strText); // Replace double quotes, commans, hyphens etc (count them as spaces) ---
    Here's the test case: --- public function testWordCountWithQuotes() { $textStats = new TextStatistics(); $text = "\"There should be seven words,\" said Joe"; $expected = 7; $actual = $textStats->word_count($text); // value is 8 $this->assertEqual($actual, $expected); } --- Here's a possible fix: In the clean_text(), replace: --- $strText = preg_replace('/[,:;()-]/', ' ', $strText); // Replace commans, hyphens etc (count them as spaces) --- with: --- $strText = preg_replace('/[",:;()-]/', ' ', $strText); // Replace double quotes, commans, hyphens etc (count them as spaces) ---
  • May 23, 2009
    issue 3 (More problem words from Dale-Chall Word list) commented on by jamestse   -   Google is our friend: http://rfptemplates.technologyevaluation.com/Dale-Chall-List-of-3000-Simple-Words.html :)
  • May 18, 2009
    issue 5 (Add or sub syllable) reported by yuanzhou19   -   Hi, In your code, the syllable_count function, there is an array of $arrSubSyllables, and below is the caculation code: foreach ($arrSubSyllables as $strSyllable) { $intSyllableCount -= preg_match('~' . $strSyllable . '~', $strWord); } what is the meaning of '~'? It seems you didn't use "//" as standard delimiter.
    Hi, In your code, the syllable_count function, there is an array of $arrSubSyllables, and below is the caculation code: foreach ($arrSubSyllables as $strSyllable) { $intSyllableCount -= preg_match('~' . $strSyllable . '~', $strWord); } what is the meaning of '~'? It seems you didn't use "//" as standard delimiter.
  • May 18, 2009
    issue 3 (More problem words from Dale-Chall Word list) commented on by yuanzhou19   -   Do we have a standard list?
    Do we have a standard list?
  • Mar 10, 2009
    issue 1 (Combined words are not handled) commented on by e.zerener   -   parke
    parke
  • Mar 03, 2009
    issue 4 (The Reading Kitten) reported by glouis1133   -   Hmm, I was testing it out on random text and noticed that "the reading kitten" gave an output of 4 syllables but "the kitten reading" gives 5 Why does it give two different results?
    Hmm, I was testing it out on random text and noticed that "the reading kitten" gave an output of 4 syllables but "the kitten reading" gives 5 Why does it give two different results?
  • Feb 27, 2009
    issue 3 (More problem words from Dale-Chall Word list) reported by jamestse   -   Here are some words that syllable_count() calculate as one syllable. You should be able to cut and paste it to the $arrProblemWords in syllable_count() ,'beyond' => 2 ,'apiece' => 2 ,'bandage' => 2 ,'cabbage' => 2 ,'college' => 2 ,'cottage' => 2 ,'crooked' => 2 ,'crowded' => 2 ,'damage' => 2 ,'doesnt' => 2 ,'flour' => 2 ,'forest' => 2 ,'garbage' => 2 ,'garage' => 2 ,'hundred' => 2 ,'inches' => 2 ,'joyous' => 2 ,'language' => 2 ,'lettuce' => 2 ,'maybe' => 2 ,'mayor' => 2 ,'message' => 2 ,'notice' => 2 ,'office' => 2 ,'package' => 2 ,'palace' => 2 ,'peaches' => 2 ,'peaceful' => 2 ,'police' => 2 ,'postage' => 2 ,'reader' => 2 ,'reading' => 2 ,'really' => 2 ,'rejoice' => 2 ,'sausage' => 2 ,'savage' => 2 ,'service' => 2 ,'surface' => 2 ,'village' => 2 ,'wasnt' => 2 ,'wicked' => 2
    Here are some words that syllable_count() calculate as one syllable. You should be able to cut and paste it to the $arrProblemWords in syllable_count() ,'beyond' => 2 ,'apiece' => 2 ,'bandage' => 2 ,'cabbage' => 2 ,'college' => 2 ,'cottage' => 2 ,'crooked' => 2 ,'crowded' => 2 ,'damage' => 2 ,'doesnt' => 2 ,'flour' => 2 ,'forest' => 2 ,'garbage' => 2 ,'garage' => 2 ,'hundred' => 2 ,'inches' => 2 ,'joyous' => 2 ,'language' => 2 ,'lettuce' => 2 ,'maybe' => 2 ,'mayor' => 2 ,'message' => 2 ,'notice' => 2 ,'office' => 2 ,'package' => 2 ,'palace' => 2 ,'peaches' => 2 ,'peaceful' => 2 ,'police' => 2 ,'postage' => 2 ,'reader' => 2 ,'reading' => 2 ,'really' => 2 ,'rejoice' => 2 ,'sausage' => 2 ,'savage' => 2 ,'service' => 2 ,'surface' => 2 ,'village' => 2 ,'wasnt' => 2 ,'wicked' => 2
  • Jan 29, 2009
    issue 2 (Numbers are not handled correctly) reported by d...@addedbytes.com   -   Numbers within text numerically (1, 20, 100 etc) may not be handled correctly. Currently an unknown - should "20" be counted as two syllables ("twen-ty") or as one syllable? Or should it be excluded from the calculations?
    Numbers within text numerically (1, 20, 100 etc) may not be handled correctly. Currently an unknown - should "20" be counted as two syllables ("twen-ty") or as one syllable? Or should it be excluded from the calculations?
  • Jan 29, 2009
    issue 1 (Combined words are not handled) reported by d...@addedbytes.com   -   Words which combine letters and numbers are not handled correctly. For example, "3a" in text should be counted as two separate words, each of one syllable.
    Words which combine letters and numbers are not handled correctly. For example, "3a" in text should be counted as two separate words, each of one syllable.

Older

  • Oct 11, 2008
    r8 (Added Dale-Chall and Spache word lists.) committed by d...@addedbytes.com   -   Added Dale-Chall and Spache word lists.
    Added Dale-Chall and Spache word lists.
  • Oct 07, 2008
    r7 (Certain HTML tags should be preceeded by a full-stop. str_i...) committed by joel...@cyberone.com.au   -   Certain HTML tags should be preceeded by a full-stop. str_ireplace is only in PHP5 so I can't check in a change for PHP4. Not a big reg exp user but this could possibly be replaced by one or could a strtolower call for PHP4 and then use str_replace. Plus fixed undefined index notice problem
    Certain HTML tags should be preceeded by a full-stop. str_ireplace is only in PHP5 so I can't check in a change for PHP4. Not a big reg exp user but this could possibly be replaced by one or could a strtolower call for PHP4 and then use str_replace. Plus fixed undefined index notice problem
  • Aug 03, 2008
  • Aug 01, 2008
    r5 (Added PHP4 version of class.) committed by d...@addedbytes.com   -   Added PHP4 version of class.
    Added PHP4 version of class.
  • Aug 01, 2008
    r4 (Added word completed so far, including three unit test class...) committed by d...@addedbytes.com   -   Added word completed so far, including three unit test classes and the text stats class itself. At this point all tests pass. Test classes include a basic class of common and uncommon words and sentence structures; If (by Rudyard Kipling); and the first paragraph of Moby Dick (by Herman Melville).
    Added word completed so far, including three unit test classes and the text stats class itself. At this point all tests pass. Test classes include a basic class of common and uncommon words and sentence structures; If (by Rudyard Kipling); and the first paragraph of Moby Dick (by Herman Melville).
  • Aug 01, 2008
    ReadabilityFormulae (Common readability formulae in pseudo-code) Wiki page edited by d...@addedbytes.com
  • Aug 01, 2008
    ReadabilityFormulae (Common readability formulae in pseudo-code) Wiki page added by d...@addedbytes.com
  • Jul 31, 2008
    Project php-text-statistics created by d...@addedbytes.com   -   A PHP class for giving information about text, including readability scores.
    A PHP class for giving information about text, including readability scores.
 
Hosted by Google Code