I have a text file which contains several spelling variants of many words:
For e.g.
identification ... ID .. identity...contract.... contr.... contractor...medicine...pills..tables
So I want to have a synonym text file which contains the words synonyms and would like to replace all the variants with the primary word. Essentially I want the normalize the input file.
For e.g my synonym list file would look like
identification = ID identify
contracting = contract contractor contractors contra......
word3 = word3_1 word3_2 word3_3 ..... word3_n
.
.
.
.
medicine = pills tables drugs...
I want the end output file to look like
identification ... identification .. identification...contractor.... contractor.... contractor...medicine...medicine..medicine
How do I got about programming in python?
Thanks a lot for your help!!!