Ejemplo n.º 1
0
 public InferenceState(EsKnowledge knowledge, string targetProperty)
 {
     _facts        = new Dictionary <string, string>();
     _knowledge    = knowledge;
     _skippedRules = new HashSet <EsRule>(EqualityComparer <EsRule> .Default);
     _targetStack  = new Stack <string>();
     _targetStack.Push(targetProperty);
     TargetProperty = targetProperty;
 }
Ejemplo n.º 2
0
 public InferenceEngine(EsKnowledge knowledge, Func <string, IReadOnlyList <string>, Task <string> > questionFunc)
 {
     _knowledge         = knowledge;
     _questionFuncAsync = questionFunc;
 }
Ejemplo n.º 3
0
 public InferenceEngine(EsKnowledge knowledge, Func <string, IReadOnlyList <string>, string> questionFunc)
 {
     _knowledge         = knowledge;
     _questionFuncAsync = (x, y) => Task.FromResult(questionFunc(x, y));
 }