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).

1  
!7
2  
3  
sclass BottomUpParser > DynPrintLogWithInput {
4  
  transient S lastOutput;
5  
  
6  
  start {
7  
    set flag DynModule. set flag NoFancyMechParsing.
8  
    dm_useLocallyCopiedMechLists();
9  
    
10  
    // In case lists change
11  
    doEvery(5000, r { update(inputChooser.input()) });
12  
  }
13  
  
14  
  void update(fS s) {
15  
    temp enter();
16  
    
17  
    //print("updating");
18  
    
19  
    S rendered = hijackPrint(r {
20  
      new AI_BottomUpParser1 parser;
21  
      parser.parse(s);
22  
      parser.printWordsAndGroups();
23  
      parser.printConstituentsOfFullGroup();
24  
    });
25  
26  
    bool shouldPrint = neq(rendered, lastOutput);
27  
    lastOutput = rendered;
28  
    if (shouldPrint) print("\n> " + s + "\n" + rendered);
29  
  }
30  
}

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: 411 / 1969
Version history: 15 change(s)
Referenced in: [show references]