Uses 1319K of libraries. Click here for Pure Java version (8795L/45K).
!7 cmodule ELEPrefixSuffixSplitter > DynPrintLog { /*transient LS prefixes = ll("un", "pre"), suffixes = ll("able", "like", "ology", "ing", "y", "ist", "ism");*/ start { dm_onUserUtteranceWithoutMine(input -> pnl(transitiveHullIteratorOfFunction( s -> stringEmits(r { processInput(s) }), litciset(input)))); } void processInput(S input) { //print(input); for (S s : mL("Common prefixes")) if (swic_notSame(input, s) && !isSpace(input.charAt(l(s)))) emit(joinPairWithSpace(pairOfNFirstAndRest(input, l(s)))); for (S s : mL("Common suffixes")) if (ewic_notSame(input, s) && !isSpace(input.charAt(l(input)-1-l(s)))) emit(joinPairWithSpace(pairOfRestAndNLast(input, l(s)))); } }
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: | #1026484 |
| Snippet name: | ELE: Prefix Suffix Splitter |
| Eternal ID of this version: | #1026484/14 |
| Text MD5: | 061872741433943c63a9cd626520fc30 |
| Transpilation MD5: | 7c4ccf0ac77a6183537bf7c7bb632dd9 |
| Author: | stefan |
| Category: | javax / ele |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-01-07 00:01:51 |
| Source code size: | 777 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 413 / 5369 |
| Version history: | 13 change(s) |
| Referenced in: | [show references] |