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

8
LINES

< > BotCompany Repo | #1028932 - ai_splitOffWordSuffixes

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

Libraryless. Click here for Pure Java version (2885L/18K).

sS ai_splitOffWordSuffixes(Set<S> suffixes, S input) {
  ret mapCodeTokens_javaTok(input, s -> {
    fOr (S suffix : suffixes)
      if (ewic_notSame(s, suffix))
        ret insertSpaceAt(s, l(s)-l(suffix));
    ret s;
  });
}

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028932
Snippet name: ai_splitOffWordSuffixes
Eternal ID of this version: #1028932/2
Text MD5: c9f3a80135377cc26c4fc7166a406526
Transpilation MD5: c5ff5432db0cecf94ae465e8c46bb299
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:56:01
Source code size: 233 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 8 / 26
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1028932 & http://1028932.tinybrain.de