예제 #1
0
 public override TregexMatcher Matcher(Tree root, Tree tree,
                                       IdentityDictionary <Tree, Tree> nodesToParents,
                                       Dictionary <string, Tree> namesToNodes,
                                       VariableStrings variableStrings,
                                       IHeadFinder headFinder)
 {
     return(new CoordinationMatcher(this, root, tree, nodesToParents, namesToNodes, variableStrings, headFinder));
 }
예제 #2
0
 public override TregexMatcher Matcher(Tree root, Tree tree,
     IdentityDictionary<Tree, Tree> nodesToParents,
     Dictionary<string, Tree> namesToNodes,
     VariableStrings variableStrings,
     IHeadFinder headFinder)
 {
     return new CoordinationMatcher(this, root, tree, nodesToParents, namesToNodes, variableStrings, headFinder);
 }
예제 #3
0
 public TregexMatcher(Tree root, Tree tree, IdentityDictionary <Tree, Tree> nodesToParents,
                      Dictionary <string, Tree> namesToNodes, VariableStrings variableStrings, IHeadFinder headFinder)
 {
     this.root            = root;
     this.tree            = tree;
     this.nodesToParents  = nodesToParents;
     this.namesToNodes    = namesToNodes;
     this.variableStrings = variableStrings;
     this.headFinder      = headFinder;
 }
예제 #4
0
 public TregexMatcher(Tree root, Tree tree, IdentityDictionary<Tree, Tree> nodesToParents,
     Dictionary<string, Tree> namesToNodes, VariableStrings variableStrings, IHeadFinder headFinder)
 {
     this.root = root;
     this.tree = tree;
     this.nodesToParents = nodesToParents;
     this.namesToNodes = namesToNodes;
     this.variableStrings = variableStrings;
     this.headFinder = headFinder;
 }
예제 #5
0
 public DescriptionMatcher(DescriptionPattern n, Tree root, Tree tree,
                           IdentityDictionary <Tree, Tree> nodesToParents,
                           Dictionary <string, Tree> namesToNodes,
                           VariableStrings variableStrings,
                           IHeadFinder headFinder) :
     base(root, tree, nodesToParents, namesToNodes, variableStrings, headFinder)
 {
     myNode = n;
     // no need to reset anything - everything starts out as null or false.
     // lazy initialization of children to save time.
     // resetChildIter();
 }
예제 #6
0
            // do all con/dis-juncts have to be considered to determine a match?
            // i.e. true if conj and not negated or disj and negated

            public CoordinationMatcher(CoordinationPattern n, Tree root, Tree tree,
                                       IdentityDictionary <Tree, Tree> nodesToParents,
                                       Dictionary <string, Tree> namesToNodes,
                                       VariableStrings variableStrings,
                                       IHeadFinder headFinder) :
                base(root, tree, nodesToParents, namesToNodes, variableStrings, headFinder)
            {
                myNode   = n;
                children = new TregexMatcher[myNode.children.Count];
                // lazy initialize the children... don't set children[i] yet

                //for (int i = 0; i < children.length; i++) {
                //  TregexPattern node = myNode.children.get(i);
                //  children[i] = node.matcher(root, tree, nodesToParents,
                //                             namesToNodes, variableStrings);
                //}
                currChild   = 0;
                considerAll = myNode.isConj ^ myNode.IsNegated();
            }
예제 #7
0
 public abstract TregexMatcher Matcher(Tree root, Tree tree,
                                       IdentityDictionary <Tree, Tree> nodesToParents,
                                       Dictionary <string, Tree> namesToNodes,
                                       VariableStrings variableStrings,
                                       IHeadFinder headFinder);
예제 #8
0
 public DescriptionMatcher(DescriptionPattern n, Tree root, Tree tree,
     IdentityDictionary<Tree, Tree> nodesToParents,
     Dictionary<string, Tree> namesToNodes,
     VariableStrings variableStrings,
     IHeadFinder headFinder) :
         base(root, tree, nodesToParents, namesToNodes, variableStrings, headFinder)
 {
     myNode = n;
     // no need to reset anything - everything starts out as null or false.  
     // lazy initialization of children to save time.
     // resetChildIter();
 }
예제 #9
0
            // do all con/dis-juncts have to be considered to determine a match?
            // i.e. true if conj and not negated or disj and negated

            public CoordinationMatcher(CoordinationPattern n, Tree root, Tree tree,
                IdentityDictionary<Tree, Tree> nodesToParents,
                Dictionary<string, Tree> namesToNodes,
                VariableStrings variableStrings,
                IHeadFinder headFinder) :
                    base(root, tree, nodesToParents, namesToNodes, variableStrings, headFinder)
            {
                myNode = n;
                children = new TregexMatcher[myNode.children.Count];
                // lazy initialize the children... don't set children[i] yet

                //for (int i = 0; i < children.length; i++) {
                //  TregexPattern node = myNode.children.get(i);
                //  children[i] = node.matcher(root, tree, nodesToParents,
                //                             namesToNodes, variableStrings);
                //}
                currChild = 0;
                considerAll = myNode.isConj ^ myNode.IsNegated();
            }
예제 #10
0
 public abstract TregexMatcher Matcher(Tree root, Tree tree,
     IdentityDictionary<Tree, Tree> nodesToParents,
     Dictionary<string, Tree> namesToNodes,
     VariableStrings variableStrings,
     IHeadFinder headFinder);