We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue transferred from Google Code:
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:
$strText = preg_replace('/[,:;()-]/', ' ', $strText); // Replace commans,
$strText = preg_replace('/[",:;()-]/', ' ', $strText); // Replace double
The text was updated successfully, but these errors were encountered:
Formatting a bit stuffed ... original is here:
http://code.google.com/p/php-text-statistics/issues/detail?id=6
Sorry, something went wrong.
This was added to the code.
No branches or pull requests
Issue transferred from Google Code:
Here's the test case:
public function testWordCountWithQuotes() {
$textStats = new TextStatistics();
$text = ""There should be seven words," said Joe";
}
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)
The text was updated successfully, but these errors were encountered: