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

29
LINES

< > BotCompany Repo | #1017471 // English Bottom-Up Parser v2 (with guessing, dev.)

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

Libraryless. Compilation Failed (18964L/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 {
      AI_BottomUpParser1 parser = ai_parseToTreeWithGuessing(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 #1017355

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: #1017471
Snippet name: English Bottom-Up Parser v2 (with guessing, dev.)
Eternal ID of this version: #1017471/4
Text MD5: e8b505ec5068008b763886274ba54db6
Transpilation MD5: a198ebfc2e6b956fb4f9e122126cec8e
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-09-11 16:54:16
Source code size: 705 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 357 / 437
Version history: 3 change(s)
Referenced in: