public static void main(String[] args) throws Exception{
        String dictFile = "words.txt";
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        String line;
        TopQueue topQueue;

        if(args.length == 1) {
            dictFile = args[0];
        }
        else if(args.length == 0) {
            System.out.println("The system will using the default setting.");
            System.out.println("java Editex words.txt");
        }
        else {
            System.out.println("usage: java Editex [dictionary]");
            return;
        }

        while((line = reader.readLine()) != null){
            System.out.println("Editex:");
            long startTime = System.currentTimeMillis();
            topQueue = search(line, dictFile);
            topQueue.print();
            long consumingTime = System.currentTimeMillis() - startTime;
            System.out.println(consumingTime + " ms");
        }
    }