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

9
LINES

< > BotCompany Repo | #1028928 // ai_wordStartToSuffixes

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

Libraryless. Click here for Pure Java version (2639L/17K).

// e.g. wordPart = "fall", sentence = "falling road"
static Set<S> ai_wordStartToSuffixes(S wordPart, S sentence) {
  Set<S> out = ciSet();
  new Matches m;
  for (S s : javaTokC(sentence))
    if (swic(s, wordPart, m) && nempty(m.rest()))
      out.add(m.rest());
  ret out;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1028928
Snippet name: ai_wordStartToSuffixes
Eternal ID of this version: #1028928/3
Text MD5: fa120b272d409447d45ae1d61929f506
Transpilation MD5: 0b16107ffbcb488a60abfca40feecfdb
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-12 12:28:00
Source code size: 285 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 134 / 179
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)