1 | // tok is CNC |
2 | static LS ai_splitSplittables_cnc(L<S> tok) { |
3 | MultiMap<S> splits = mechMultiMapCI(ai_language() + " splittables => split"); |
4 | for (int i = 1; i < l(tok); i += 2) { |
5 | L<S> l = splits.get(tok.get(i)); |
6 | if (nempty(l)) |
7 | replaceSubList(tok, i, i+1, ll(first(l))); // For now, take first possibility |
8 | } |
9 | ret tok; |
10 | } |
Began life as a copy of #1017417
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018386 |
Snippet name: | ai_splitSplittables_cnc |
Eternal ID of this version: | #1018386/2 |
Text MD5: | 6ab8cf7e526ab80953c7a40c8bf1ed0c |
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:31 |
Source code size: | 345 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 352 / 383 |
Version history: | 1 change(s) |
Referenced in: | [show references] |