1 | sS cereproc_preprocess(S text) { |
2 | text = trim(text); |
3 | if (empty(text)) null; |
4 | text = text.replaceAll("\\s+", " "); |
5 | S text2 = shorten(text, 1000); |
6 | if (neq(text, text2)) print("Cereproc: Text shortened from " + l(text) + " to " + l(text2) + " chars"); |
7 | ret text2; |
8 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1013999 |
Snippet name: | cereproc_preprocess |
Eternal ID of this version: | #1013999/3 |
Text MD5: | 77e48cd82870cfdd3fed61723c7aa583 |
Author: | stefan |
Category: | javax / speech |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-03-19 04:00:43 |
Source code size: | 278 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 463 / 486 |
Version history: | 2 change(s) |
Referenced in: | [show references] |