예제 #1
0
 internal LocationMatcher(TreeLocation _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     this._enclosing   = _enclosing;
     this.newNodeNames = newNodeNames;
     this.coindexer    = coindexer;
     this.childMatcher = this._enclosing.child.Matcher(newNodeNames, coindexer);
 }
예제 #2
0
        public override TsurgeonMatcher Matcher()
        {
            CoindexationGenerator coindexer = null;

            if (coindexes)
            {
                coindexer = new CoindexationGenerator();
            }
            return(Matcher(Generics.NewHashMap <string, Tree>(), coindexer));
        }
예제 #3
0
 public TsurgeonMatcher(TsurgeonPattern pattern, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     // TODO: ideally we should have the tree and the tregex matcher be
     // part of this as well.  That would involve putting some of the
     // functionality in Tsurgeon.java in this object
     this.newNodeNames = newNodeNames;
     this.coindexer    = coindexer;
     this.childMatcher = new Edu.Stanford.Nlp.Trees.Tregex.Tsurgeon.TsurgeonMatcher[pattern.children.Length];
     for (int i = 0; i < pattern.children.Length; ++i)
     {
         this.childMatcher[i] = pattern.children[i].Matcher(newNodeNames, coindexer);
     }
 }
 public Matcher(AdjoinToHeadNode _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
     : base(this._enclosing, newNodeNames, coindexer)
 {
     this._enclosing = _enclosing;
 }
 public override TsurgeonMatcher Matcher(IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     return(new AdjoinToHeadNode.Matcher(this, newNodeNames, coindexer));
 }
예제 #6
0
 public Matcher(InsertNode _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
     : base(this._enclosing, newNodeNames, coindexer)
 {
     this._enclosing      = _enclosing;
     this.locationMatcher = this._enclosing.location.Matcher(newNodeNames, coindexer);
 }
예제 #7
0
 public RelabelMatcher(RelabelNode _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
     : base(this._enclosing, newNodeNames, coindexer)
 {
     this._enclosing = _enclosing;
 }
예제 #8
0
 public Matcher(TsurgeonPatternRoot _enclosing, IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
     : base(this._enclosing, newNodeNames, coindexer)
 {
     this._enclosing = _enclosing;
 }
예제 #9
0
 public override TsurgeonMatcher Matcher(IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     return(new TsurgeonPatternRoot.Matcher(this, newNodeNames, coindexer));
 }
 public abstract TsurgeonMatcher Matcher(IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer);
예제 #11
0
 public virtual TreeLocation.LocationMatcher Matcher(IDictionary <string, Tree> newNodeNames, CoindexationGenerator coindexer)
 {
     return(new TreeLocation.LocationMatcher(this, newNodeNames, coindexer));
 }