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

30
LINES

< > BotCompany Repo | #1017355 // English Bottom-Up Parser v1

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (18619L/136K).

!7

sclass BottomUpParser > DynPrintLogWithInput {
  transient S lastOutput;
  
  start {
    set flag DynModule. set flag NoFancyMechParsing.
    dm_useLocallyCopiedMechLists();
    
    // In case lists change
    doEvery(5000, r { update(inputChooser.input()) });
  }
  
  void update(fS s) {
    temp enter();
    
    //print("updating");
    
    S rendered = hijackPrint(r {
      new AI_BottomUpParser1 parser;
      parser.parse(s);
      parser.printWordsAndGroups();
      parser.printConstituentsOfFullGroup();
    });

    bool shouldPrint = neq(rendered, lastOutput);
    lastOutput = rendered;
    if (shouldPrint) print("\n> " + s + "\n" + rendered);
  }
}

Author comment

Began life as a copy of #1017311

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1017355
Snippet name: English Bottom-Up Parser v1
Eternal ID of this version: #1017355/16
Text MD5: cc752d64fa2202d8d3250844fb6710d0
Transpilation MD5: 4cbe7bd0ba875a9cbe9b27e1ef533ed4
Author: stefan
Category: javax / a.i.
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-20 12:58:34
Source code size: 701 bytes / 30 lines
Pitched / IR pitched: No / No
Views / Downloads: 410 / 1966
Version history: 15 change(s)
Referenced in: [show references]