I have a situation where I have two list of strings(single words) created from reading in text. The first list is ordered by frequency of which the words appear in the text (minus stop words), and then the second list is unordered.
What I need to do is compare the unordered list to the ordered one, and return the top 2 words that appear most frequently in the ordered list.
Can't think how to do this at all. I am currently just returning all words that appear in both by using for loops and the cmp() method.
Any suggestions would be great.....Thank s
What I need to do is compare the unordered list to the ordered one, and return the top 2 words that appear most frequently in the ordered list.
Can't think how to do this at all. I am currently just returning all words that appear in both by using for loops and the cmp() method.
Any suggestions would be great.....Thank s
Comment