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

8
LINES

< > BotCompany Repo | #1013466 // ai_expandCluster_articles

JavaX fragment (include)

static Set<S> ai_expandCluster_articles(Set<S> cluster) {
  for (S s : cloneList(cluster))
    if (swicOneOf(s, "a ", "an ", "the "))
      cluster.add(dropFirstWord(s));
    else
      addAll(cluster, aOrAn(s), "the " + s);
  ret cluster;
}

Author comment

Began life as a copy of #1013463

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: #1013466
Snippet name: ai_expandCluster_articles
Eternal ID of this version: #1013466/1
Text MD5: f32e0d263db4425633e9477d41b230a1
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-01-07 13:31:37
Source code size: 248 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 307 / 338
Referenced in: [show references]