Guest User

Untitled

a guest
Oct 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. for (int i = highestFreq; i > 0; i--) {
  2. List<String> freqWords = spelledCorrectly.findByFrequency(i);
  3. if (!freqWords.isEmpty()) {
  4. freqWords.sort((a, b) -> a.compareTo(b));
  5. System.out.println("nfrequency " + i + "n" + freqWords);
  6. }
  7. }
  8.  
  9. List<String> freqWords = incoming.stream()
  10. .filter(i -> i = highestFreq)
  11. .sorted(comparing(spelledCorrectly::getValue).reversed())
  12. .map(freqWords::getId)
  13. .forEach(System.out.println("nfrequency " + i + "n" +
  14. freqWords));
Add Comment
Please, Sign In to add comment