List of usage examples for edu.stanford.nlp.trees LabeledScoredTreeNode label
Label label
To view the source code for edu.stanford.nlp.trees LabeledScoredTreeNode label.
Click Source Link
From source file:elkfed.expletives.EF_Tree.java
License:Apache License
public void extractFeatures(ExpletiveInstance inst) { Tree t_root = inst.getRoot();//from w w w. j a v a2s .c o m Tree t_pron = inst.getPronoun(); int idx; LabeledScoredTreeNode t2 = (LabeledScoredTreeNode) t_pron.parent(t_root); while (t2 != t_root && !t2.label().value().matches("(S|RRC|FRAG|VP)")) { t2 = (LabeledScoredTreeNode) t2.parent(t_root); } inst.setFeature(FD_EXPL_TREE, tree_inside(t2, t_pron)); //inst.setFeature(FD_EXPL_TREE2, tree_markonly(t2,t_pron)); inst.setFeature(FD_EXPL_TREE2, t2); }