Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1406.Advanced search and replace -- How to count original form of words in a passage?

User: roger -- 2017-12-05          << 1405  1407 >>
Hits: 592
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have many passages, and I have recently got a lemma list.
Could I get a lemmatized wordlist with word count.
Explanation:

the attached file goes like this:
have --> has, have, having, had
apple --> apple, apples

So when there are two words "apple and apples" in the passage, the wordlist will contain only the head word "apple", but the number goes to "2".
And If possible, I hope I can batch run it, because I have got hundreds of passages in a folder.
Input Sample:
He has an apple. They have many apples. ...
Output Sample:
he 1
have 2
a 1
apple 2
they 1

many 1
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. Load e_lemma.txt:
(1) put file e_lemma.txt to d:\test\  and save as ansi type
(2) ctrl-h open replace dialog:
click 'advance' tab, set 'run following at the beginning' to:

(3) click 'replace'.
2. process files
(1) ctrl-h open 'replace' dialog
* set 'search for pattern' to: 

* uncheck 'print unmatched unit' option
click 'advanced' tab:
* set 'run following at the beginning' to:

* set 'run following for each' to:

* set 'insert end text' to:

(2) click 'batch', pick files, set output filename to , click "batch replace

Screenshot 1:  Replace_Advanced_Window


Screenshot 2:  Replace_Window


Screenshot 3:  Replace_Advanced_Window


Screenshot 4:  Batch_Runner_Window


Similar Examples:
How to replace words to their original form in a passage? (70%)
How to count number of each intial letters in all words in text file? (56%)
How to set column N according to some words in column A in csv file? (55%)
How to count the occurrence of a list of words in a text file? (54%)
How to extract and join first words from adjacent lines? (53%)
How to count how many characters in a web page? (53%)
How to count the frequency of numbers base on the value range? (53%)
How to convert invalid charcters in csv file? (52%)

Check Demo of Advanced search and replace
Keywords:
ansi  pass  avi  two words  desc  dic  insert end text  insert end  process  two  batch file number of word count  batch split file line count  batch count number of words in a file  batch insert a word to a filename  split text head  batch split words  ansi text 2  batch list filename only