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

10
LINES

< > BotCompany Repo | #1012610 // ai_nlVary

JavaX fragment (include)

static S ai_nlVary(S s) {
  LL<S> tok = ai_nlClassify1(s); // last element in each place is quoted original
  for (int i = 1; i < l(tok); i += 2) {
    L<S> l = tok.get(i);
    S word = ai_varyClassification(l);
    if (word != null)
      tok.set(i, ll(quoteUnlessQuoted(word)));
  }
  ret join(map(func(L<S> set) { unquote(last(set)) }, tok));
}

Author comment

Began life as a copy of #1012601

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: #1012610
Snippet name: ai_nlVary
Eternal ID of this version: #1012610/7
Text MD5: 7baae84789aeadaea8f5b39f4a0ceebd
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-07 23:59:26
Source code size: 356 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 413
Version history: 6 change(s)
Referenced in: [show references]