// tok is CODE tokens only! static LS ai_splitSplittables(L<S> tok) { MultiMap<S> splits = mechMultiMapCI(ai_language() + " splittables => split"); for i over tok: { L<S> l = splits.get(tok.get(i)); if (nempty(l)) replaceSubList(tok, i, i+1, words(first(l))); // For now, take first possibility } ret tok; } sS ai_splitSplittables(S s) { ret join(ai_splitSplittables_cnc(javaTok(s))); }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1017417 |
| Snippet name: | ai_splitSplittables |
| Eternal ID of this version: | #1017417/9 |
| Text MD5: | 2e29cc89c2cc71e1beaefa70795da65b |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-09-25 12:57:21 |
| Source code size: | 424 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 569 / 625 |
| Version history: | 8 change(s) |
| Referenced in: | [show references] |