internal SemgrexMatcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_aligned, bool hyp, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings ) { // to be used for patterns involving "@" // these things are used by "find" this.sg = sg; this.alignment = alignment; this.sg_aligned = sg_aligned; this.hyp = hyp; this.node = node; this.namesToNodes = namesToNodes; this.namesToRelations = namesToRelations; this.variableStrings = variableStrings; }
internal SemgrexMatcher(SemanticGraph sg, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings) : this(sg, null, null, true, node, namesToNodes, namesToRelations, variableStrings) { }
internal abstract SemgrexMatcher Matcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, bool hypToText, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings, bool ignoreCase);
public CoordinationMatcher(CoordinationPattern c, SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, bool hypToText, IndexedWord n, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings, bool ignoreCase) : base(sg, alignment, sg_align, hypToText, n, namesToNodes, namesToRelations, variableStrings) { // 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 myNode = c; children = new SemgrexMatcher[myNode.children.Count]; for (int i = 0; i < children.Length; i++) { SemgrexPattern node = myNode.children[i]; children[i] = node.Matcher(sg, alignment, sg_align, hypToText, n, namesToNodes, namesToRelations, variableStrings, ignoreCase); } currChild = 0; considerAll = myNode.isConj ^ myNode.IsNegated(); }
internal override SemgrexMatcher Matcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, bool hypToText, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings, bool ignoreCase) { return(new CoordinationPattern.CoordinationMatcher(this, sg, alignment, sg_align, hypToText, node, namesToNodes, namesToRelations, variableStrings, ignoreCase)); }
public NodeMatcher(NodePattern n, SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, bool hyp, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings , bool ignoreCase) : base(sg, alignment, sg_align, hyp, node, namesToNodes, namesToRelations, variableStrings) { // universal: childMatcher is null if and only if // myNode.child == null OR resetChild has never been called myNode = n; this.ignoreCase = ignoreCase; ResetChildIter(); }
internal override SemgrexMatcher Matcher(SemanticGraph sg, Alignment alignment, SemanticGraph sg_align, bool hyp, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings, bool ignoreCase) { // log.info("making matcher: " + // ((reln.equals(GraphRelation.ALIGNED_ROOT)) ? false : hyp)); return(new NodePattern.NodeMatcher(this, sg, alignment, sg_align, (reln.Equals(GraphRelation.AlignedRoot)) ? false : hyp, (reln.Equals(GraphRelation.AlignedRoot)) ? sg_align.GetFirstRoot() : node, namesToNodes, namesToRelations, variableStrings , ignoreCase)); }
internal override SemgrexMatcher Matcher(SemanticGraph sg, IndexedWord node, IDictionary <string, IndexedWord> namesToNodes, IDictionary <string, string> namesToRelations, VariableStrings variableStrings, bool ignoreCase) { return(new NodePattern.NodeMatcher(this, sg, null, null, true, node, namesToNodes, namesToRelations, variableStrings, ignoreCase)); }