Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

845.Count and statistics -- How to count the appearance of 100 most commonly used words in an article?

User: editor -- 2011-08-31          << 844  846 >>
Hits: 250
Type: Count and statistics   
Search all Count and statistics examples
Description:
How to count the appearance of 100 most commonly used words in an article?
Input Sample:
========================
The list of 100 most commonly used words:

the
of
and
a
to
in
is
you
...
=======================
The Text file to count:

In each area, Replace Pioneer is making differences: You can replace a whole word or whole line that containing specific word/phrase; You can apply any function on your search result like adding 5 for each number; You can batch rename files base on any part of file content, or image size or date; You can split files into many files...
Output Sample:
The appearance of most commonly used 100 words:

the 1
of 3
and 2
a 3
to 1
in 4
is 1
you 9
...
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open the file containing 100 most commonly used words, for example: 100_common_words.txt
2. ctrl-h open 'replace' dialog
* set 'replace unit' to 'Line'
* set 'replace with pattern' to:

3. click 'replace', done.
4. ctrl-s save to my_pattern.txt

Following steps is to count the article:
5. open "Tools->Pattern Counter" menu
6. select "File/http" option, and select the article text file.
7. click "Import" to import my_pattern.txt
8. check option of 'ignore cases', 'reg exp'
9. click "Count", the appearance of each word will be listed.
10. click "Copy" to copy all content to clipboard.
Download Script:  scripts/845_pattern.zip

Screenshot 1:  Replace_Window


Screenshot 2:  Pattern_Counter_Window


Similar Examples:
How to count the occurrance of some specified words in many files? (63%)
How to count the occurrence of a list of words in a text file? (62%)
Can I count the appearance frequency of each character in a text file? (56%)
How to extract all upper cases words from a text file? (54%)
How to count the occurrance of each bytes from 00-FF in a binary file? (51%)
How to count and sort the occurrence of different numbers in a text file? (50%)
How to find out the top 5 most frequently appearred words in English article? (50%)
How to change columns in each line to specified order in text file? (50%)

Check Demo of Count and statistics
Keywords:
common  counter  pattern counter  ignore  import  statist  statistics  ics  copy  content  100 word text example  statistics words appearance  count words appearance  count the appearance in text file  word appearance count  count each word appearance  count word appearance  most used word statistics in file