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

31
LINES

< > BotCompany Repo | #1017329 // Teach The English Parser [dev.]

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

Libraryless. Click here for Pure Java version (17734L/128K).

!7

sclass ButtonsForParser extends DynSCP {
  start {
    dm_useLocallyCopiedMechLists();
    doEveryAndNow(5000, r actualUpdate);
  }
  
  void actualUpdate {
    temp enter();
    O parser = dm_moduleOfType("EnglishParser");
    //print("Parser: " + parser);
    if (parser == null) ret;
    Pair<S, L<ParseResult1>> p = (Pair) quickImport(
    getOpt(parser, 'lastResults));
    if (p == null) ret;
    Container stack = dynamicVStack2();
    new Set<PairS> seen;
    for (ParseResult1 r : p.b)
      for (final PairS a : r.assumptions) {
        if (!isAngleBracketed(a.a)) continue;
        if (!seen.add(a)) continue;
        //print("Got assumption: " + a);
        add(stack, centerAndEastWithMargins(jlabel("Assumption: "+ a), jbutton("Confirm", r {
          Set<S> listNames = ai_mechListNamesForAngleBracketCategory(a.a);
          print("Should add " + quote(a.b) + " to " + listNames);
        })));
      }
    setComponent(stack);
  }
}

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: #1017329
Snippet name: Teach The English Parser [dev.]
Eternal ID of this version: #1017329/16
Text MD5: 465231893639afdf38e09912c0cf0e1c
Transpilation MD5: 950e84dfc89d4109b17c03a0a4d7d04f
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-17 16:53:52
Source code size: 983 bytes / 31 lines
Pitched / IR pitched: No / No
Views / Downloads: 385 / 554
Version history: 15 change(s)
Referenced in: