Libraryless. Click here for Pure Java version (2639L/17K).
1 | // e.g. wordPart = "fall", sentence = "falling road" |
2 | static Set<S> ai_wordStartToSuffixes(S wordPart, S sentence) { |
3 | Set<S> out = ciSet(); |
4 | new Matches m; |
5 | for (S s : javaTokC(sentence)) |
6 | if (swic(s, wordPart, m) && nempty(m.rest())) |
7 | out.add(m.rest()); |
8 | ret out; |
9 | } |
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: | 215 / 290 |
Version history: | 2 change(s) |
Referenced in: | [show references] |