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

19
LINES

< > BotCompany Repo | #1021627 // simpleUnicodeEmojiList

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

Libraryless. Click here for Pure Java version (3540L/24K/83K).

1  
!7
2  
3  
// keys = unicode, values = keywords
4  
static cached Map<S, Set<S>> simpleUnicodeEmojiList() {
5  
  S json = gunzipTextSnippet(#1400186);
6  
  Map map = jsonDecodeMap(json);
7  
  //pnl(keys(map));
8  
  Map<S, Set<S>> emojis = new TreeMap;
9  
  for (L<Map<S, O>> l : (Collection<L<Map<S, O>>>) values(map)) {
10  
    for (Map<S, O> item : l) {
11  
      S code = getString code(item);
12  
      if (containsSpace(code)) continue; // skip those for now
13  
      LS keywords = cast _get keywords(item); // this version of get is new in x30
14  
      print(code + " = " + joinWithSpacedPlus(keywords));
15  
      emojis.put(textualCodePointToString(code), asLinkedHashSet(keywords));
16  
    }
17  
  }
18  
  ret emojis;
19  
}

Author comment

Began life as a copy of #1021623

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1021627
Snippet name: simpleUnicodeEmojiList
Eternal ID of this version: #1021627/4
Text MD5: 552cd6841a28c47f1fd84909de816ae9
Transpilation MD5: b674b896038d3e7344a0062955bade15
Author: stefan
Category: javax / unicode
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-23 11:08:57
Source code size: 687 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 319 / 410
Version history: 3 change(s)
Referenced in: [show references]