List of usage examples for edu.stanford.nlp.trees Tree constituents
public Set<Constituent> constituents()
From source file:ims.cs.lingdata.Token.java
License:Open Source License
/** * Determines whether a constituent starts at this token * @return/*from ww w.j av a 2 s . c om*/ */ public boolean hasStartingConstituents() { Tree tree = sentence.tree; Set<Constituent> constituents = tree.constituents(); for (Constituent c : constituents) { if (c.end() - c.start() > 1 && c.start() == predSentencePosition) return true; } return false; }
From source file:ims.cs.lingdata.Token.java
License:Open Source License
/** * Determines whether a constituent ends at this token * @return//from www .j a v a 2 s.c o m */ public boolean hasEndingConstituents() { Tree tree = sentence.tree; Set<Constituent> constituents = tree.constituents(); for (Constituent c : constituents) { if (c.end() - c.start() > 1 && c.end() == predSentencePosition) return true; } return false; }