Labels extends AlignmentData { public String[] getLabelSymbols() { if (items == null) return null; String[] symbols = new String[items.length]; for (int i=0; i<items.length; i++) { symbols[i] = items[i].phn; } return symbols; } Labels(Label[] items);  Labels(String[] lines);  Labels(String[] lines, int minItemsPerLine);  Labels(Labels e);  Labels(InputStream in);  Labels(String labelFile);  Labels(Document acoustparams); String[] getLabelSymbols(); void print(); @Override String toString(); int getLabelIndexAtTime(double time); @Override boolean equals(Object other); @Override int hashCode(); public Label[] items; }
@Test public void canReadWithXwavesLabelfileReader() throws Exception { Labels l = new Labels(getClass().getResourceAsStream("pop001.lab")); XwavesLabelfileReader xr = new XwavesLabelfileReader(new InputStreamReader(getClass().getResourceAsStream("pop001.lab"), "ASCII")); Labels xl = xr.getLabels(); assertEquals(l.items.length, xl.items.length); assertArrayEquals(l.items, xl.items); assertEquals(l, xl); assertArrayEquals(l.getLabelSymbols(), xl.getLabelSymbols()); }