1 | // tok is CODE tokens only! |
2 | static LS ai_splitSplittables(L<S> tok) { |
3 | MultiMap<S> splits = mechMultiMapCI(ai_language() + " splittables => split"); |
4 | for i over tok: { |
5 | L<S> l = splits.get(tok.get(i)); |
6 | if (nempty(l)) |
7 | replaceSubList(tok, i, i+1, words(first(l))); // For now, take first possibility |
8 | } |
9 | ret tok; |
10 | } |
11 | |
12 | sS ai_splitSplittables(S s) { |
13 | ret join(ai_splitSplittables_cnc(javaTok(s))); |
14 | } |
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: | 351 / 402 |
Version history: | 8 change(s) |
Referenced in: | [show references] |