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

12
LINES

< > BotCompany Repo | #1022230 // ai_dropFillers_once

JavaX fragment (include)

static LS ai_dropFillers_once(S s) {
  LS phrases = mL("Fillers");
  LS tokS = javaTokNPunctuation_cached(s);
  LL<S> tokPhrases = map javaTokNPunctuation_cached(phrases);
  int n = l(tokS);
  new LS out;
  for (int i = 1; i < n; i += 2)
    for (LS tokPhrase : tokPhrases)
      if (codeTokenSubListEqualsIC(tokS, tokPhrase, i))
        out.add(trimJoin(ai_dropTokens(tokS, i, i+l(tokPhrase)-1)));
  ret out;
}

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: 166 / 237
Version history: 11 change(s)
Referenced in: [show references]