1 | static LS ai_dropFillers_once(S s) { |
2 | LS phrases = mL("Fillers"); |
3 | LS tokS = javaTokNPunctuation_cached(s); |
4 | LL<S> tokPhrases = map javaTokNPunctuation_cached(phrases); |
5 | int n = l(tokS); |
6 | new LS out; |
7 | for (int i = 1; i < n; i += 2) |
8 | for (LS tokPhrase : tokPhrases) |
9 | if (codeTokenSubListEqualsIC(tokS, tokPhrase, i)) |
10 | out.add(trimJoin(ai_dropTokens(tokS, i, i+l(tokPhrase)-1))); |
11 | ret out; |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
Snippet ID: | #1022230 |
Snippet name: | ai_dropFillers_once |
Eternal ID of this version: | #1022230/12 |
Text MD5: | 7e6194d74f2bd67d51473d3be5033f45 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-12 00:50:32 |
Source code size: | 422 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 236 / 306 |
Version history: | 11 change(s) |
Referenced in: | [show references] |