1  | sbool nlLogic_twoStageProcessing_verbose;  | 
2  | |
3  | // stage1/stage2: "<default>" or mech list name  | 
4  | svoid nlLogic_twoStageProcessing(S input, S stage1, S stage2, L<ExecutedRule> resultsOut) {
 | 
5  | L<ExecutedRule> results1 = nlLogic_processInputOrFact(input, false, stage1);  | 
6  | |
7  | // Collect results of stage 1  | 
8  | nlLogic_collectExecutedRulesWithOutputOrFacts(results1, resultsOut);  | 
9  | |
10  | // Collect inputs for stage 2  | 
11  | Set<S> newInputs = nlLogic_inputsFromExecutedRules(litorderedset(input), results1);  | 
12  | |
13  |   for (S s : newInputs) {
 | 
14  | if (nlLogic_twoStageProcessing_verbose)  | 
15  |       print("Stage 2: " + s);
 | 
16  | L<ExecutedRule> results2 = nlLogic_processInputOrFact(s, false, stage2);  | 
17  | |
18  | // Collect results of stage 2  | 
19  | nlLogic_collectExecutedRulesWithOutputOrFacts(results2, resultsOut);  | 
20  | }  | 
21  | }  | 
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1018281 | 
| Snippet name: | nlLogic_twoStageProcessing | 
| Eternal ID of this version: | #1018281/3 | 
| Text MD5: | 0aff0e3dcb5ea46cd000acec2e868964 | 
| Author: | stefan | 
| Category: | javax / a.i. | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2018-09-14 13:17:21 | 
| Source code size: | 798 bytes / 21 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 505 / 554 | 
| Version history: | 2 change(s) | 
| Referenced in: | [show references] |