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

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  
      AI_BottomUpParser1 parser = ai_parseToTreeWithGuessing(s);
21  
      parser.printWordsAndGroups();
22  
      parser.printConstituentsOfFullGroup();
23  
    });
24  
25  
    bool shouldPrint = neq(rendered, lastOutput);
26  
    lastOutput = rendered;
27  
    if (shouldPrint) print("\n> " + s + "\n" + rendered);
28  
  }
29  
}

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: 300 / 369
Version history: 3 change(s)
Referenced in: [show references]