static bool learnedFlexMatch(S pattern, S s) {
ret learnedFlexMatch(pattern, s, null);
}
static bool learnedFlexMatch(S pattern, S s, Matches m) {
if (!flexMatchIC(dropPunctuationAtEnd(pattern), dropPunctuationAtEnd(s), m)) false;
MatchLearner l = uniq(MatchLearner, +pattern);
S status = l.examples.get(s);
if (eq(status, 'rejected)) false;
if (empty(status))
l.examples.put(s, 'assumed);
true;
}download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1010906 |
| Snippet name: | learnedFlexMatch - flexMatchIC + learning counterexamples |
| Eternal ID of this version: | #1010906/8 |
| Text MD5: | a833f879fb9b66aed1cfecd5d6fa0714 |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-11-14 13:41:45 |
| Source code size: | 428 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 905 / 936 |
| Version history: | 7 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1011532 - learnedFlexMatch_multi |