Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

286.Advanced search and replace -- How to list all specific terms that appearing in a text file?

User: Jon -- 2008-10-25          << 285  287 >>
Hits: 3504
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
I have a large dictionary (70,000) terms in the key format.  I want to generate  
output that lists every term from the dictionary that was found in a file.  It  
should ignore case (so even if the dict terms are uppercase and the file  
contains the lowercase version, the output will list the version found in the  
dictionary).
Input Sample:
Reversible mental depression  
progressing to catatonia; visual  
disturbances; hallucinations; an  
acute reversible syndrome  
characterized by disorientation for  
time and place, short-term memory  
loss, emotional lability, slightly  
clouded sensorium, and decreased  
performance on neuropsychometrics.
Output Sample:
Depression 
Hallucinations 
Memory Loss
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
We assume your terms are separated by newline like: 
Term1 
Term2 
Term3 
 
Detailed Procedures: 
 
1. Import dictionary 
 
Open "Tools->Dictionary->Dictionary Import" menu. 
* change "load data from" to "File" 
* enter dictionary file 
* set format to "key" 
click start, your dictionary will be imported to system 
 
2. ctrl-o to open your text file 
3. ctrl-h to open replace window 
select "Advance" page: 
 
* set "run following for each matched unit" to: 
 
 
* set "insert end text" field to: 
 
 
4. click "Replace" button, you will get the result. 
 
Note:  
1. If you want to check more files, you do not need repeat step 1 every time. 
2. Above procedures are tested with small samples, large file may have some delay, it depends on your file size and computer performance. 
Download Script:  scripts/286.rst.zip

Screenshot 1:  Replace_Advanced_Window


Similar Examples:
How to extract all specified date format from a text file? (69%)
How to extract all lines with specified date range from text file? (64%)
How to count the occurrance of specific pattern in each line of text file? (64%)
How to replace specific spaces into comma in each line of text file? (64%)
How to count how many IP addresses are appearing in  a text file? (64%)
How to extract all numbers that are greater than 60 in a text file? (63%)
How to add specified text to the begin and end of many text files? (62%)
How to shuffle all elements in a specified range in text file? (61%)

Check Demo of Advanced search and replace
Keywords:
delay  lowercase  uppercase  terms  appearing  lists  keys  file size  size  newline  small dictionary text file  start with uppercase  change to lowercase  change to uppercase  replace lists  dictionary load  output found text  files dictionary