예제 #1
0
        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);
        }
예제 #2
0
 public RuleStructureCombination(IntermediateRuleStructure source, TargetRuleStructure target)
 {
     _source = source;
     _target = target;
 }
예제 #3
0
 public RuleNameMatching(List <string> replace, Dictionary <string, int> replaceIndex, TargetRuleStructure targetStructure)
 {
     toReplace      = replace;
     toReplaceIndex = replaceIndex;
     target         = targetStructure;
 }