User Profile
Collapse
-
Think I've sorted it now. Cheers... -
Maybe I'm confused but is it??
I have a list like this (a lot longer), which already has the words sorted in their frequency order:
sortedWords = ["hello", "test", "said", "once", "example"]
and another list of say 10 or so words, that are also present in the sorted list.
I want to iterate through my shorter list and return the top 2 words...Leave a comment:
-
Returning top items from list
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...
No activity results to display
Show More
Leave a comment: