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

12
LINES

< > BotCompany Repo | #1022851 // tok_markedPhrases

JavaX fragment (include)

1  
static LS tok_markedPhrases(LS tok, BitSet marked) {
2  
  new LS out;
3  
  for (int i = 1; i < l(tok); i += 2) {
4  
    if (!getBit(marked, i)) continue;
5  
    int j = i+2;
6  
    while (j < l(tok) && getBit(marked, j))
7  
      j += 2;
8  
    out.add(joinSubList(tok, i, j-1));
9  
    i = j;
10  
  }
11  
  ret out;
12  
}

Author comment

Began life as a copy of #1022850

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022851
Snippet name: tok_markedPhrases
Eternal ID of this version: #1022851/1
Text MD5: 7851d193f00ebd9421ccb8027d522891
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-10 17:33:20
Source code size: 297 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 224 / 262
Referenced in: [show references]