/** * Get the root constituent of the tree that covers a sentence */ public Constituent getTreeRoot(int sentenceId) { return this.getTreeRoot(this.getTextAnnotation().getSentence(sentenceId)); }
/** * Get the root constituent of the tree that covers a sentence */ public Constituent getTreeRoot(int sentenceId) { return this.getTreeRoot(this.getTextAnnotation().getSentence(sentenceId)); }
private void findRoots() { if (roots == null) roots = new TIntObjectHashMap<>(); for (int i = 0; i < this.textAnnotation.sentences().size(); ++i) if(null == roots.get(i)) roots.put(i, getTreeRoot(this.textAnnotation.getSentence(i))); }
private void findRoots() { if (roots == null) roots = new TIntObjectHashMap<>(); for (int i = 0; i < this.textAnnotation.sentences().size(); ++i) if(null == roots.get(i)) roots.put(i, getTreeRoot(this.textAnnotation.getSentence(i))); }