public boolean calcNPSubj(TreebankNode n){ if(n == null) return false; if(n.getNodeType().equals("NP")){ StringArray tags = n.getNodeTags(); if(tags != null && tags.size() > 0){ for(int i = 0; i < tags.size(); i++){ if(tags.get(i).equals("SBJ")){ return true; } } } } return false; }
public boolean calcNPSubj(TreebankNode n){ if(n == null) return false; if(n.getNodeType().equals("NP")){ StringArray tags = n.getNodeTags(); if(tags != null && tags.size() > 0){ for(int i = 0; i < tags.size(); i++){ if(tags.get(i).equals("SBJ")){ return true; } } } } return false; }