Libraryless. Click here for Pure Java version (5750L/39K).
| 1 | sS wordNet_pretty(S query) {
 | 
| 2 | L<WordNet> l = wordNet(query); | 
| 3 | if (empty(l)) ret "No results"; | 
| 4 | ret lines_rtrim(map(l, e -> e.word | 
| 5 | + (empty(e.synonyms) ? "" : " (also: " + joinWithComma(e.synonyms) + ")") | 
| 6 | + ": " + e.description | 
| 7 |     + addPrefixIfNempty("\n  examples: ", e.examples)));
 | 
| 8 | } | 
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1023891 | 
| Snippet name: | wordNet_pretty | 
| Eternal ID of this version: | #1023891/3 | 
| Text MD5: | c768523f4d46b8b984d61789898425c6 | 
| Transpilation MD5: | 0266042dc3a036adbb54afd5784e758b | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2019-07-11 20:28:53 | 
| Source code size: | 303 bytes / 8 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 702 / 940 | 
| Version history: | 2 change(s) | 
| Referenced in: | [show references] |