1 | svoid gazelle_addPredictionToTreeNode(GazelleTree child, O... _) { |
2 | bool debug = boolPar debug(_); |
3 | Set<S> badComments = cast optPar badComments(_); |
4 | Set<S> acceptablePurposes = cast optPar acceptablePurposes(_); |
5 | |
6 | RuleEngine2_MatchedRule r = child.mr; |
7 | GazelleEvalContext ctx = child.ctx; |
8 | |
9 | if (containsAny(r.rule.comments, badComments) |
10 | || acceptablePurposes != null && !acceptablePurposes.contains(unnull(r.rule.purpose))) { |
11 | if (debug) print("prediction=bad for various reasons"); |
12 | child.prediction = 'bad; |
13 | } else { |
14 | /*ai_gazelle_analyzeStatementsForRule_Data data = ctx.dataByRule.get(r.rule.globalID); |
15 | child.prediction = data == null ? null : ai_gazelle_predictor1_onData(r, data);*/ |
16 | if (ctx.predictor == null) |
17 | child.prediction = null; |
18 | else { |
19 | child.prediction = ctx.predictor.get(ctx, r); |
20 | if (debug) print("Prediction=" + child.prediction + " for " + r + " (" + (r.moreConditions() ? "unsatisfied" : "satisfied") + ") by " + ctx.predictor); |
21 | } |
22 | } |
23 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney
No comments. add comment
Snippet ID: | #1022013 |
Snippet name: | gazelle_addPredictionToTreeNode |
Eternal ID of this version: | #1022013/4 |
Text MD5: | 936dabda9e623da352a56fa886facc32 |
Author: | stefan |
Category: | javax / a.i. |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-05 16:58:56 |
Source code size: | 1034 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 312 / 344 |
Version history: | 3 change(s) |
Referenced in: | [show references] |