Character count, Word Count/Stats/Sort

Random_word_generator  Character_encoding 
Word Count and Stats
* Can count and make stats in text file, binary file, or internet web pages.
* Can count and make stats on user-defined pattern with string or regular expression.
* Supports 10 pre-defined statistics patterns as example.
* Supports defining, modifying, importing and exporting multiple patterns.
* For each pattern, supports detailed instance listing and sorting.

Pattern Counter

Pattern Counter is designed to make text statistics on different patterns since version 2.3

 

Pattern Counter can be launched by selecting menu "Tools->Pattern Counter":

 

 

 

Please go to Pattern Counter session for detail

"Pattern Counter" is highly recommended for word/chars counting rather than legacy method below.

Count Frequency of Specified Words/Patterns

Example:

Count how many 'replace','file','text','format' in the text

Character count

Settings:

1) Search for pattern=.*

2) Replace with pattern=

number of replace=count($match,"[Rr]eplace")

number of file=count($match,"[Ff]ile")

number of text=count($match,"[Tt]ext")

number of format=count($match,"[Ff]ormat")


List and Sort number of all words or specified pattern

Example 1:

List and sort occurrance of all words

Character count

Settings:

1) Print Unmatch Unit='No'(uncheck this option)

2) Search for pattern=.*

3) Advanced Page->Run following at beginning=clear_values_all()

4) Advanced Page->Run following for each matched result=

set_value($match,get_value($match)+1);

$word_input_delimiter='\W+';

5) Advanced Page->End Text=sort_by_word(get_values_all(),2,2,'num','desc')

Example 2:

List all occurrance and count of 'aa'...'az', do sort

Character count

Settings:

1) Print Unmatch Unit='No'(uncheck this option)

2) Search for pattern=a[a-z]

3) Advanced Page->Run following at beginning=clear_values_all()

4) Advanced Page->Run following for each matched result=

set_value($match,get_value($match)+1);

5) Advanced Page->End Text=sort_by_word(get_values_all(),2,2,'num','desc')


Count the number of line matching specified pattern/word

Example:

Count how many line contain 'text','replace','the','and' respectively

Character count

Settings:

1) Replace unit=Line

2) Search for pattern=[Tt]ext|[Rr]eplace|[Tt]he|[Aa]nd

3) After "replace", there is a statistics in the Line Page at the bottom


', '>',$fString); $fString = str_replace( '<', '<',$fString); $fString = str_replace( chr(32), ' ',$fString); $fString = str_replace( chr(13), ' ',$fString); $fString = str_replace( chr(10) & chr(10), '
',$fString); $fString = str_replace( chr(10), '
',$fString); } return $fString; } function show_pages($page,$MaxPage,$colname_rs) { echo " Page:$page/$MaxPage    "; if ($MaxPage<=1) {return;} echo "Goto: "; if ($page>1) { $prevPage=$page-1; echo "\"Previous  "; } for($p=$page-10;$p<=$page-1;$p++) { if ($p>0) { echo "$p ";} } echo "$page "; for($p=$page+1;$p<=$page+10;$p++) { if ($p<=$MaxPage) { echo "$p ";} } if ($page<$MaxPage) { $nextPage=$page+1; echo " \"Next "; } echo ""; } //$dbid = mysql_connect($hostname,$dbuser,$dbpasswd) or die(""); //mysql ServerNorthWind //$db = mysql_select_db("mindp9_test",$dbid) or die(""); //SQL $query = "SELECT * FROM ("; for($i=0;$i $MaxPage) $page=$maxPage; ?>

Other Examples of "" " .HtmlEncode($arr[2]).""; } //if }//for echo "
"; }//if ?> Search all "" examples