public Tree readTree() { Tree t = null; while(t == null && sentences != null && sentIdx < sentences.getLength()) { Node sentRoot = sentences.item(sentIdx++); t = getTreeFromXML(sentRoot); if(t != null) { t = treeNormalizer.normalizeWholeTree(t, treeFactory); if(t.label() instanceof CoreLabel) { String ftbId = ((Element) sentRoot).getAttribute(ATTR_NUMBER); ((CoreLabel) t.label()).set(CoreAnnotations.SentenceIDAnnotation.class, ftbId); } } } return t; }
for(Node childNode = eRoot.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) { if(childNode.getNodeType() != Node.ELEMENT_NODE) continue; Tree t = getTreeFromXML(childNode); if(t == null) { System.err.printf("%s: Discarding empty tree (root: %s)%n", this.getClass().getName(),childNode.getNodeName());
public Tree readTree() { Tree t = null; while(t == null && sentences != null && sentIdx < sentences.getLength()) { Node sentRoot = sentences.item(sentIdx++); t = getTreeFromXML(sentRoot); if(t != null) { t = treeNormalizer.normalizeWholeTree(t, treeFactory); if(t.label() instanceof CoreLabel) { String ftbId = ((Element) sentRoot).getAttribute(ATTR_NUMBER); ((CoreLabel) t.label()).set(CoreAnnotations.SentenceIDAnnotation.class, ftbId); } } } return t; }
public Tree readTree() { Tree t = null; while(t == null && sentences != null && sentIdx < sentences.getLength()) { Node sentRoot = sentences.item(sentIdx++); t = getTreeFromXML(sentRoot); if(t != null) { t = treeNormalizer.normalizeWholeTree(t, treeFactory); if(t.label() instanceof CoreLabel) { String ftbId = ((Element) sentRoot).getAttribute(ATTR_NUMBER); ((CoreLabel) t.label()).set(CoreAnnotations.SentenceIDAnnotation.class, ftbId); } } } return t; }
public Tree readTree() { Tree t = null; while(t == null && sentences != null && sentIdx < sentences.getLength()) { Node sentRoot = sentences.item(sentIdx++); t = getTreeFromXML(sentRoot); if(t != null) { t = treeNormalizer.normalizeWholeTree(t, treeFactory); if(t.label() instanceof CoreLabel) { String ftbId = ((Element) sentRoot).getAttribute(ATTR_NUMBER); ((CoreLabel) t.label()).set(CoreAnnotations.SentenceIDAnnotation.class, ftbId); } } } return t; }
for(Node childNode = eRoot.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) { if(childNode.getNodeType() != Node.ELEMENT_NODE) continue; Tree t = getTreeFromXML(childNode); if(t == null) { System.err.printf("%s: Discarding empty tree (root: %s)%n", this.getClass().getName(),childNode.getNodeName());
for(Node childNode = eRoot.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) { if(childNode.getNodeType() != Node.ELEMENT_NODE) continue; Tree t = getTreeFromXML(childNode); if(t == null) { System.err.printf("%s: Discarding empty tree (root: %s)%n", this.getClass().getName(),childNode.getNodeName());
for(Node childNode = eRoot.getFirstChild(); childNode != null; childNode = childNode.getNextSibling()) { if(childNode.getNodeType() != Node.ELEMENT_NODE) continue; Tree t = getTreeFromXML(childNode); if(t == null) { System.err.printf("%s: Discarding empty tree (root: %s)%n", this.getClass().getName(),childNode.getNodeName());