// properties)
{
readingFile = false;
- hmm.fillSymbols(parser);
+ fillSymbols(parser);
numberOfSymbols = hmm.getNumberOfSymbols();
}
else if ("STATS".equals(next))
}
+ /**
+ * Fills symbol array and adds each symbol to an index lookup
+ *
+ * @param parser
+ * The scanner scanning the symbol line in the file.
+ */
+ public void fillSymbols(Scanner parser)
+ {
+ int i = 0;
+ while (parser.hasNext())
+ {
+ String strSymbol = parser.next();
+ char[] symbol = strSymbol.toCharArray();
+ hmm.getSymbols().add(symbol[0]);
+ hmm.setSymbolIndex(symbol[0], i);
+ i++;
+ }
+ }
}