Libraryless. Click here for Pure Java version (18305L/131K).
1 | !7 |
2 | |
3 | sclass MatchInput > DynPrintLogWithInput { |
4 | start { dm_useLocallyCopiedMechLists(); } |
5 | |
6 | void update(S s) { |
7 | print("\n> " + s); |
8 | L<S> tok = printStruct(javaTokWithAngleBracketsC(s)); |
9 | PlanInMotion<S> plan = new(mech_englishSentencePatterns()); |
10 | L<Pair<S, L<PairS>>> results = new L; // pattern + match |
11 | for (S pat : plan.master()) |
12 | ai_matchAngleBracketPattern_toResults(pat, tok, results); |
13 | |
14 | for (Pair<S, L<PairS>> p : sortedByLengthOfPairBList(results)) |
15 | print(" Result: Choose pattern " + quote(p.a) + " for input " + quote(s) + " if match: " + ai_renderMatch(p.b)); |
16 | } |
17 | } |
Began life as a copy of #1017205
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: | #1017207 |
Snippet name: | Match Input With Pattern v3 shortened |
Eternal ID of this version: | #1017207/19 |
Text MD5: | 6eb7113255d849065b9300b6554b0e67 |
Transpilation MD5: | b270291d56db7f11f7fd6140deaf3048 |
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:20:13 |
Source code size: | 627 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 448 / 894 |
Version history: | 18 change(s) |
Referenced in: | [show references] |