I have a .txt file like this:
ancient 0.4882
detained 5.5512
neighboring 2.9644
scores 0.5951
eggs 0.918
excesses 3.0974
proceedings 0.7446
menem 1.7971
I want to display the top 3 words by comparing their value in one list and the remaining words in another list.
i.e., the output for this example should be:
[detained, excesses, neighboring] & [menem, eggs, proceedings, scores, ancient]
How to do that?
EDIT:
I forgot to mention one thing: I want to consider only those words that have a value great than 0.5 How to do that?