private void addTreeToAlphabet(DepTree tree) { for (DepTreeNode node : tree) { if (node.getLabel() != WallDepTreeNode.WALL_LABEL) { int idx = alphabet.lookupIndex(node.getLabel()); if (idx == -1) { throw new RuntimeException("Unknown label: " + node.getLabel()); } } } }
public Set<String> getTypes() { Set<String> types = new HashSet<String>(); for (DepTree tree : this) { for (DepTreeNode node : tree) { types.add(node.getLabel()); } } types.remove(WallDepTreeNode.WALL_LABEL); return types; }