Tree node = sentence.get(tokenPosition + offset);
if (!(node.label() instanceof CoreLabel)) {
throw new IllegalArgumentException("Can only featurize CoreLabel trees");
}
return (CoreLabel) node.label();
}
public static CoreLabel getCoreLabel(Tree node) {
if (!(node.label() instanceof CoreLabel)) {
throw new IllegalArgumentException("Can only featurize CoreLabel trees");