public static String readLabelFile(String entrySeparator,boolean ensureInitialBoundary,String trfname) throws IOException {
  BufferedReader lab=new BufferedReader(new FileReader(trfname));
  try {
    XwavesLabelfileReader xlds=new XwavesLabelfileReader(trfname);
    String result=StringUtils.join(entrySeparator,xlds.getLabelSymbols());
    if (ensureInitialBoundary && result.charAt(0) != '_') {
      result="_" + entrySeparator + result;
    }
    return result;
  }
  finally {
    lab.close();
  }
}

public static String readLabelFile ( String entrySeparator , boolean ensureInitialBoundary , String trfname ) throws IOException { BufferedReader lab = new BufferedReader ( new FileReader ( trfname ) ) ; try { XwavesLabelfileReader xlds = new XwavesLabelfileReader ( trfname ) ; String result = StringUtils . join ( entrySeparator , xlds . getLabelSymbols ( ) ) ; if ( ensureInitialBoundary && result . charAt ( 0 ) != '_' ) { result = "_" + entrySeparator + result ; } return result ; } finally { lab . close ( ) ; } }
this reads in a label file and returns a string of the phonetic symbols , separated by the entry separator character entryseparator .
