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

23
LINES

< > BotCompany Repo | #1017286 // Match Input With Pattern v4 (with stages, dev.)

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

Libraryless. Compilation Failed (16016L/112K).

!7

sclass MatchInput > DynPrintLogWithInput {
  start { dm_useLocallyCopiedMechLists(); }
  
  class MatchResult1 {
    L<S> tokPat;
    LPairS knownMatches, assumedMatches;
  }
  
  void update(S s) {
    print("\n> " + s);
    L<S> tok = printStruct(javaTokWithAngleBracketsC(s));
    PlanInMotion<S> plan = new(mech_englishSentencePatterns());
    
    L<Result> results = new L; // pattern + match
    Iterator stage1 = mapI(plan.master(),
      matchAngleBracketPattern(pat, tok, results);

    for (Pair<S, L<PairS>> p : sortedByLengthOfPairBList(results))
      print("  [" + l(p.b) + "]: Choose pattern " + quote(p.a) + " for input "  + quote(s) + " if match: " + ai_renderMatch(p.b));
  }
}

Author comment

Began life as a copy of #1017207

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: #1017286
Snippet name: Match Input With Pattern v4 (with stages, dev.)
Eternal ID of this version: #1017286/4
Text MD5: 7e171b1b0327c4c5ad4bd09bc554e55d
Transpilation MD5: 9d4cde79263351c0b0e09eb0d48a040d
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-16 14:19:47
Source code size: 722 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 385 / 542
Version history: 3 change(s)
Referenced in: