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

7
LINES

< > BotCompany Repo | #1021692 // ai_allPrefixesWithWordCount

JavaX fragment (include)

1  
static MultiSet<S> ai_allPrefixesWithWordCount(S s) {
2  
  TreeSet<S> words = asCISet(words2_noNumbers(s);
3  
  MultiSet<S> out = ciMultiSet();
4  
  for (S prefix : ai_allWordPrefixes(s))
5  
    out.add(prefix, l(prefixSubSet(words, prefix)));
6  
  ret out;
7  
}

Author comment

Began life as a copy of #1021690

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: #1021692
Snippet name: ai_allPrefixesWithWordCount
Eternal ID of this version: #1021692/4
Text MD5: eb90dbda25f17abf67af4244d221e256
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-24 15:34:02
Source code size: 250 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 282 / 335
Version history: 3 change(s)
Referenced in: [show references]