Package

Source Code of Main

import Dictionary.Dawg;
import Dictionary.Dictionary;


public class Main
{
  static final String wordToFind[] = {"test", "accepter", "bite", "acerbites", "CONSTRUCTIVISTE", "CONSTRUCTIVISTES"};
  //Ce doit �tre une variable d'environnement qui contient tout les dico possibles, et on en passe un en param�tre..
  static final String dictionaryPath = "Francais.txt";

  public static void main(String[] args)
  {
    Dictionary d;
    try
    {
      d = new Dawg();
      d.fromFile(dictionaryPath);

      for (String s : wordToFind)
        System.out.println("The dictionary " + (d.contains(s) ? "contains" : "does not contain") + " the word " + s);
    }
    catch (Exception e)
    {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }

}
TOP

Related Classes of Main

TOP
Copyright © 2018 www.massapi.com. 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.