Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1309.Random word generator -- How to randomly replace each word with a list of pre-defined words?

User: Aaron -- 2015-07-01          << 1308  1310 >>
Hits: 1170
Type: Random word generator   
Search all Random word generator examples
Description:
I would like to use a variation of number 785 that replaces words in a text file from a word list with synonyms and phrases.
Input Sample:
 The men and women were walking down the street enjoying the evening.

Replace words:

good
men
women
street
etc.

Replacement strings:

rand_str(1,'excellent','wonderful','great','terrific')
rand_str(1,'boy friends','neighbors','gents','guys')
rand_str(1,'ladies','girl friends','pretty women','female friends')
rand_str(1,'boulvard','Parkland Avenue','sidewalk','road')
etc.

There can be a large number of words to replace with a large synonym word/phrase list. 

Output Sample:
Possible output:

The gents and ladies were walking down the sidewalk enjoying the evening. etc.

The boy friends and girl friends were walking down the boulevard enjoying the evening. etc.
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. prepare a text file word_replace.txt with following format:

2. open "Tools->Batch Runner" menu
3. drag multiple text files for replace to "Batch Runner" window
4. click "Fast Replace" button, click "import" to import the defined "word_replace.txt"
5. make sure "reg exp", "cross line" and "whole word" options are checked, click "replace", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to randomly replace one line from line 7 to line 10 with the same numbers of -? (58%)
How to replace the certain column with specified words? (57%)
How to replace a word with a list of words repeatly in a text file? (57%)
How to replace letters with predefined numbers in a text range? (55%)
How to replace specified occurrance of some string to a list of words? (55%)
How to replace words in a text file only if they are whole words? (54%)
How to randomly delete x number of lines from text inside and outside brackets? (53%)
How to replace text files using multiple pre-defined rules? (53%)

Check Demo of Random word generator
Keywords:
phrases  good  cell  whole word  excel  whole  phrase  randomly replace  randomly  random word generator  find and replace multiple words  whole number  number list generator to txt  randomly replace words  find words in files  cross line text generator  number of words of multiple files  replace the word good