private List <RuleStructureCombination> TargetRuleStructureGeneration() { List <RuleStructureCombination> result = new List <RuleStructureCombination>(); foreach (var ele in intermediateRuleStructure) { var qa = ele.QAStructure; HashSet <string> checker = new HashSet <string>(); var questionLength = ele.QuestionLength; var graphNodeSet = ele.GraphStructureList; List <SubGraphStructure> subGraphList = new List <SubGraphStructure>(); int temp = Variable.VariableZero; foreach (var graphStructure in graphNodeSet) { temp++; var nodeList = graphStructure.CurrentGraphStructure; var subgraph = ShrinkGraphNodeCollection(nodeList, qa, ele); subGraphList.Add(new SubGraphStructure(graphStructure.NodeNameSet, graphStructure.EdgeCount, subgraph)); } TargetRuleStructure target = new TargetRuleStructure(qa, questionLength, subGraphList); result.Add(new RuleStructureCombination(ele, target)); } return(result); }
public RuleStructureCombination(IntermediateRuleStructure source, TargetRuleStructure target) { _source = source; _target = target; }
public RuleNameMatching(List <string> replace, Dictionary <string, int> replaceIndex, TargetRuleStructure targetStructure) { toReplace = replace; toReplaceIndex = replaceIndex; target = targetStructure; }