1 | static L<S> splitIntoSentences_v1(S s) { |
2 | ret splitIntoSentences_v1_tok(nlTok3(s)); |
3 | } |
4 | |
5 | static L<S> splitIntoSentences_v1_tok(L<S> s) { |
6 | int i = 0; |
7 | new L<S> l; |
8 | while (i <= l(s)) { |
9 | int j = smartIndexOf(s, ".", i)+1; |
10 | addIfNempty(l, trim(join(subList(s, i, j)))); |
11 | i = j; |
12 | } |
13 | ret l; |
14 | } |
Began life as a copy of #1008428
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008429 |
Snippet name: | splitIntoSentences_v1 |
Eternal ID of this version: | #1008429/1 |
Text MD5: | c859991aa3debd61e0e0f2f34b4bee24 |
Author: | stefan |
Category: | javax / parsing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-15 15:22:15 |
Source code size: | 312 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 513 / 498 |
Referenced in: | [show references] |