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
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
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
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
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