Package com.swabunga.spell.engine

Examples of com.swabunga.spell.engine.Transformator


  }
 
  private void buildFile() throws Exception {
    // input
    int wordCount = 0;
    Transformator t;
    if (phonet == null) t = new DoubleMeta();
    else t = new GenericTransformator(new File(phonet), encoding);
    BufferedReader r;
    if (encoding == null) r = new BufferedReader(new FileReader(wordlist));
    else r = new BufferedReader(new InputStreamReader(new FileInputStream(wordlist), encoding));
   
    // output
    File file = new File(dico);
    if (file.exists()) System.out.println("WARNING: collision!");
   
    System.out.println("reading...");
    List list = new ArrayList();
    String word;
    while ((word = r.readLine()) != null) {
      String code = t.transform(word);
      if (!"".equals(code))
        list.add(new CodeAndWord(code,word));
      wordCount++;
    }
    r.close();
View Full Code Here

TOP

Related Classes of com.swabunga.spell.engine.Transformator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.