Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1023891 // wordNet_pretty

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (5750L/39K).

sS wordNet_pretty(S query) {
  L<WordNet> l = wordNet(query);
  if (empty(l)) ret "No results";
  ret lines_rtrim(map(l, e -> e.word
    + (empty(e.synonyms) ? "" : " (also: " + joinWithComma(e.synonyms) + ")")
    + ": " + e.description
    + addPrefixIfNempty("\n  examples: ", e.examples)));
}

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: 231 / 333
Version history: 2 change(s)
Referenced in: [show references]