1 | static L<S> antonymsFromSynonymDotCom(S word) { |
2 | S url = "http://www.synonym.com/synonyms/" + urlencode(lower(word)); |
3 | S html = loadPageWithUserAgent(url, "Mac Safari"); |
4 | L<S> tok = htmlTok(html); |
5 | ret multiSetByPopularity(asMultiSet(splitAtSpace(joinWithSpace(map(func(L<S> tok) -> S { dropPrefixTrim("Antonyms:", tok_html_noTags(tok)) }, |
6 | findContainerTagWithParamsDeep(tok, "ul", "class" := "antonyms")))))); |
7 | } |
Began life as a copy of #1008457
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: | #1011987 |
Snippet name: | antonymsFromSynonymDotCom |
Eternal ID of this version: | #1011987/3 |
Text MD5: | 9edd51bebe2288c75f5713714da97760 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-14 04:34:16 |
Source code size: | 426 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 414 / 425 |
Version history: | 2 change(s) |
Referenced in: | [show references] |