/** * Creates a scanner object with the Mary context features contained in Labtext and calls getTargets * * @param LabText * LabText * @param htsData * htsData * @throws Exception * Exception * @return targets */ public List<Target> getTargetsFromText(String LabText, HMMData htsData) throws Exception { List<Target> targets; Scanner s = null; try { s = new Scanner(LabText); targets = getTargets(s, htsData); } finally { if (s != null) s.close(); } return targets; }
/** * Creates a scanner object with the Mary context features contained in Labtext and calls getTargets * * @param LabText * LabText * @param htsData * htsData * @throws Exception * Exception * @return targets */ public List<Target> getTargetsFromText(String LabText, HMMData htsData) throws Exception { List<Target> targets; Scanner s = null; try { s = new Scanner(LabText); targets = getTargets(s, htsData); } finally { if (s != null) s.close(); } return targets; }
/** * Reads the Label file, the file which contains the Mary context features, creates an scanner object and calls getTargets * * @param LabFile * LabFile * @param htsData * htsData * @throws Exception * Exception * @return targets */ public static List<Target> getTargetsFromFile(String LabFile, HMMData htsData) throws Exception { List<Target> targets = null; Scanner s = null; try { /* parse text in label file */ s = new Scanner(new BufferedReader(new FileReader(LabFile))); targets = getTargets(s, htsData); } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } finally { if (s != null) s.close(); } return targets; }
/** * Reads the Label file, the file which contains the Mary context features, creates an scanner object and calls getTargets * * @param LabFile * LabFile * @param htsData * htsData * @throws Exception * Exception * @return targets */ public static List<Target> getTargetsFromFile(String LabFile, HMMData htsData) throws Exception { List<Target> targets = null; Scanner s = null; try { /* parse text in label file */ s = new Scanner(new BufferedReader(new FileReader(LabFile))); targets = getTargets(s, htsData); } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } finally { if (s != null) s.close(); } return targets; }
/** * Creates a scanner object with the Mary context features contained in Labtext and calls getTargets * * @param LabText * LabText * @param htsData * htsData * @throws Exception * Exception * @return targets */ public List<Target> getTargetsFromText(String LabText, HMMData htsData) throws Exception { List<Target> targets; Scanner s = null; try { s = new Scanner(LabText); targets = getTargets(s, htsData); } finally { if (s != null) s.close(); } return targets; }
/** * Reads the Label file, the file which contains the Mary context features, creates an scanner object and calls getTargets * * @param LabFile * LabFile * @param htsData * htsData * @throws Exception * Exception * @return targets */ public static List<Target> getTargetsFromFile(String LabFile, HMMData htsData) throws Exception { List<Target> targets = null; Scanner s = null; try { /* parse text in label file */ s = new Scanner(new BufferedReader(new FileReader(LabFile))); targets = getTargets(s, htsData); } catch (FileNotFoundException e) { System.err.println("FileNotFoundException: " + e.getMessage()); } finally { if (s != null) s.close(); } return targets; }