Libraryless. Click here for Pure Java version (2597L/17K/58K).
1 | !7 |
2 | |
3 | p-tt {
|
4 | S html = loadPage("https://en.wikipedia.org/wiki/Most_common_words_in_English");
|
5 | L<S> tok = htmlTok(html); |
6 | Map<S, L<S>> map = new LinkedHashMap; |
7 | for (L<S> ol : findContainerTagDeep(tok, "ol")) {
|
8 | S category = textOfContainerTag(last(findContainerTag(subList(tok, 0, indexOfSubList(tok, ol)+1), "h3"))); |
9 | L<S> words = map(f textOfContainerTag, html_findLIs(ol)); |
10 | if (!first(words).contains(" "))
|
11 | map.put(category, words); |
12 | } |
13 | printAsciiHeading("Words by category!");
|
14 | psl(map); |
15 | } |
Began life as a copy of #1008475
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1008480 |
| Snippet name: | Load most common english words by category from a Wikipedia page listing them [WORKS] |
| Eternal ID of this version: | #1008480/10 |
| Text MD5: | 8fb11daae6a67f6eddff0a1a8850303d |
| Transpilation MD5: | 876ffd364189f21187987f63e290c582 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-06-18 17:06:51 |
| Source code size: | 530 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 876 / 1041 |
| Version history: | 9 change(s) |
| Referenced in: | [show references] |