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

16
LINES

< > BotCompany Repo | #1023819 // ai_runNLParserTests (for current language)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (11535L/81K).

static Scorer ai_runNLParserTests() {
  new Scorer scorer;
  scorer.verboseAll = true;
  LPairS tests = mL_pairs_tlftj(ai_language() + " Parser Tests");
  if (empty(tests)) print("Have no parser tests for " + ai_language());
  fOr (PairS p : tests) {
    print(p.a);
    AI_BottomUpParser1 parser = ai_standardBUParserForCurrentLanguage();
    parser.parse(p.a);
    Set<S> classes = asCISet(parser.fullClasses());
    print("Classes: " + classes);
    for (S c : tok_splitAtComma(p.b))
      scorer.add(contains(classes, angleBracket(dropPrefix("!", c))) == !startsWith(c, "!"), c);
  }
  ret scorer;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023819
Snippet name: ai_runNLParserTests (for current language)
Eternal ID of this version: #1023819/7
Text MD5: d688ad5bda303df44c8d2101345248e6
Transpilation MD5: 794dba3367088dcf7d6237acec78b4b3
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-09 13:55:53
Source code size: 618 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 185 / 279
Version history: 6 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)