Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

14
LINES

< > BotCompany Repo | #1008429 // splitIntoSentences_v1

JavaX fragment (include)

static L<S> splitIntoSentences_v1(S s) {
  ret splitIntoSentences_v1_tok(nlTok3(s));
}

static L<S> splitIntoSentences_v1_tok(L<S> s) {
  int i = 0;
  new L<S> l;
  while (i <= l(s)) {
    int j = smartIndexOf(s, ".", i)+1;
    addIfNempty(l, trim(join(subList(s, i, j))));
    i = j;
  }
  ret l;
}

Author comment

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: 426 / 412
Referenced in: [show references]