!7
p-tt {
S html = loadPage("https://en.wikipedia.org/wiki/Most_common_words_in_English");
L tok = htmlTok(html);
Map> map = new LinkedHashMap;
for (L ol : findContainerTagDeep(tok, "ol")) {
S category = textOfContainerTag(last(findContainerTag(subList(tok, 0, indexOfSubList(tok, ol)+1), "h3")));
L words = map(f textOfContainerTag, html_findLIs(ol));
if (!first(words).contains(" "))
map.put(category, words);
}
printAsciiHeading("Words by category!");
psl(map);
}