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

14
LINES

< > BotCompany Repo | #1017407 // ai_parseTree_simplifiedText

JavaX fragment (include)

sS ai_parseTree_simplifiedText(PTElement e) {
  e = ai_parseTree_descendToComposite(e);
  if (e instanceof ChoosePart) {
    ai_Reconstructed r = e/ChoosePart.reconstruction;
    WeightedProduction prod = r.production;
    //print("Hint: " + prod.simplificationHint + " in prod: " + sfu(prod));
    if (eq(prod.simplificationHint, "L"))
      ret r.a.text();
    else if (eq(prod.simplificationHint, "R"))
      r.b.text();
    ret e/ChoosePart.word.text();
  }
  null;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1017407
Snippet name: ai_parseTree_simplifiedText
Eternal ID of this version: #1017407/6
Text MD5: 7b1cfafd0dcaae588e11ce1eaf80ad13
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-19 20:52:58
Source code size: 484 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 334 / 368
Version history: 5 change(s)
Referenced in: [show references]