Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

699.Count and statistics -- How to count the "is", "are", "am" as whole words in a text file?

User: editor -- 2011-01-17          << 698  700 >>
Hits: 3566
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to count the "is", "are", "am" as whole words in a text file? 
Word like "This" should not be counted as "is".
Input Sample:
I am here. 
Are we here? 
He is there. 
Where are you? 
This is a test.
Output Sample:
is: 2 
are: 2 
am: 1 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Pattern Counter" menu 
2. set "source" to "File", and select file. 
3. click "clear" button to clear all default pattern 
4. click "Add",set "Name" to "is" set "Pattern" to , click "ok" 
5. click "Add" again, set "Name" to "are", set "Pattern" to  
6. click "Add" again, set "Name" to "am", set "Pattern" to  
7. check "option" of "Ignore case" and "Regular exp" 
8. click "Count", all words will be counted. 
 
Note: "Ingore case" option will count word like "Am" and "am" as well. 
\b is word boundary, \b(is)\b will NOT count "This" as "is". 

Screenshot 1:  Pattern_Counter_Window


Similar Examples:
Can I count the frequency of each word in a text file? (64%)
How to count the occurrence of a list of words in a text file? (62%)
How to count and sort the frequency of all words appeared in many text files? (62%)
How to count number of each intial letters in all words in text file? (59%)
How to extract all upper cases words from a text file? (59%)
How to sort all lines of ip addresses in a text file? (58%)
How to count number of words appeared in a text file? (58%)
How to replace the content of XML with a list of words from text file? (56%)

Check Demo of Count and statistics
Keywords:
boundary  whole words  whole word  whole  pattern counter  counter  ignore case  count word  statistics  statist  count whole word  statistics words in a text  words statistics in text file  words statistics in text  set default  text statistics word  word statistics in text  count words