I have two files:  

1. Pattern file = pattern.txt  

2. File containing different terms = terms.txt 

pattern.txt contain two columns, separated by `;`  

In the first column I have several terms and in the second column abbreviations,  

associated to the first column, same line. 

terms.txt contain single words and terms defined by single words but also  

by a combination of words. 

pattern.txt 

```
Berlin;Brln
Barcelona;Barcln
Checkpoint Charly;ChckpntChrl
Friedrichstrasse;Fridrchstr
Hall of Barcelona;HllOfBarcln
Paris;Prs
Yesterday;Ystrdy

```

terms.txt 

```
Berlin  
The Berlinale ended yesterday  
Checkpoint Charly is still in Friedrichstrasse  
There will be a fiesta in the Hall of Barcelona  
Paris is a very nice city 

```

The target is to replace terms with standardised abbreviations and to find out which terms  

have no abbreviation.  

As result I would like to have two files.  

The first file is a new terms file, with terms replaced by abbreviations where it could be replaced.  

The second file containing a list with all terms that doesn't have an abbreviation.  

The output is case insensitive, I don't make difference between "`The`" and "`the`".

new\_terms.txt 

```
Brln  
The Berlinale ended Ystrdy  
ChckpntChrl is still in Fridrchstr  
There will be a fiesta in the HllOfBarcln  
Prs is a very nice city  

```

terms\_without\_abbreviations.txt

```
a  
be  
Berlinale  
city  
ended  
fiesta  
in  
is  
nice  
of  
still  
The  
There  
very  
will  

```

I will appreciate your help and thanks in advance for your time and hints!