/** * Construct a transformation table from the phonetic file * @param phonetic the phonetic file as specified in aspell * @param encoding the character set required * @throws java.io.IOException indicates a problem while reading * the phonetic file */ public GenericTransformator(File phonetic, String encoding) throws IOException { buildRules(new BufferedReader(new InputStreamReader(new FileInputStream(phonetic), encoding))); alphabetString = washAlphabetIntoReplaceList(getReplaceList()); }
/** * Construct a transformation table from the phonetic file * @param phonetic the phonetic file as specified in aspell * @throws java.io.IOException indicates a problem while reading * the phonetic file */ public GenericTransformator(File phonetic) throws IOException { buildRules(new BufferedReader(new FileReader(phonetic))); alphabetString = washAlphabetIntoReplaceList(getReplaceList()); }
/** * Construct a transformation table from the phonetic file * @param phonetic the phonetic file as specified in aspell. The file is * supplied as a reader. * @throws java.io.IOException indicates a problem while reading * the phonetic information */ public GenericTransformator(Reader phonetic) throws IOException { buildRules(new BufferedReader(phonetic)); alphabetString = washAlphabetIntoReplaceList(getReplaceList()); }