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

29
LINES

< > BotCompany Repo | #1017365 // German Bottom-Up Parser v1

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

Libraryless. Click here for Pure Java version (18837L/138K).

1  
!7
2  
3  
sclass BottomUpParser > DynPrintLogWithInput {
4  
  transient S lastOutput;
5  
  
6  
  start {
7  
    dm_useLocallyCopiedMechLists();
8  
    
9  
    // In case lists change
10  
    doEvery(5000, r { update(inputChooser.input()) });
11  
  }
12  
  
13  
  void update(S s) {
14  
    temp enter();
15  
    ai_setLanguage("German");
16  
  
17  
    final new AI_BottomUpParser1 parser;
18  
    parser.parse(s);
19  
    
20  
    S rendered = hijackPrint(r {
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: #1017365
Snippet name: German Bottom-Up Parser v1
Eternal ID of this version: #1017365/1
Text MD5: dfd626b1c299c062c05f23fbb71633f0
Transpilation MD5: 30d51bb50204cc72a48d1eaf791464fd
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-19 15:08:25
Source code size: 651 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 421 / 982
Referenced in: [show references]