Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = highestFreq; i > 0; i--) {
- List<String> freqWords = spelledCorrectly.findByFrequency(i);
- if (!freqWords.isEmpty()) {
- freqWords.sort((a, b) -> a.compareTo(b));
- System.out.println("nfrequency " + i + "n" + freqWords);
- }
- }
- List<String> freqWords = incoming.stream()
- .filter(i -> i = highestFreq)
- .sorted(comparing(spelledCorrectly::getValue).reversed())
- .map(freqWords::getId)
- .forEach(System.out.println("nfrequency " + i + "n" +
- freqWords));
Add Comment
Please, Sign In to add comment