Find most frequent words on a webpage (using Jsoup)?
问题 In my project I have to count the most frequent words in a Wikipedia article. I found Jsoup for parsing HTML format, but that still leaves the problem of word frequency. Is there a function in Jsoup that count the freqeuncy of words, or any way to find which words are the most frequent on a webpage, using Jsoup ? Thanks. 回答1: Yes, you could use Jsoup to get the text from the webpage, like this: Document doc = Jsoup.connect("http://en.wikipedia.org/").get(); String text = doc.body().text();