Package edu.stanford.nlp.semgraph.semgrex

Examples of edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher


  }
 
  private List<TreeItem> selectNode(INode inode, TreeItem [] items){
    String name  = inode.getName()+"-";
    List<TreeItem>  list = new ArrayList<TreeItem>();
    NodeMatcher expMatcher = new NodeMatcher();
    for(TreeItem item : items){
      if(item.getText().startsWith(name)){
        String indexValue = item.getText().substring(name.length());
        int index = Integer.parseInt(indexValue);
       
        if(inode instanceof NodeExp) {
          NodeExp nodeExp = (NodeExp)inode;
          if(expMatcher.match(nodeExp.getPattern(), index)) {
            Attribute [] attrs = nodeExp.getAttributes();
            if(attrs == null || attrs.length < 1) {
              list.add(item);
            } else {
              String data = (String)item.getData();
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.semgraph.semgrex.NodePattern$NodeMatcher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.