Score SynsetTerms
1 soft#18 mild#3 balmy#2
1 love#2 enjoy#3
0.625 love#1
From the input above, how can i achieve the output as below? I wish to create a file that has the word and their score by removing duplicate words, and splitting each word into a new row. Duplicated words with higher score will be selected instead.
Score SynsetTerms
1 soft
1 mild
1 balmy
1 enjoy
1 love
note that the word 'love' with 0.625 score was removed, only the 'love' with score 1 is kept as it has higher score.