public static TopQueue search(String target, String dictFile) throws IOException {
        BufferedReader reader;
        reader = new BufferedReader(new FileReader(dictFile));

        TopQueue topQueue = new TopQueue();
        String word;

        int distance;

        while((word = reader.readLine()) != null)
        {
            // get the number of distance in Editex
            distance = Editex.editex(target,word);

            if(!topQueue.isEmpty()){
                if(distance < topQueue.getEntryDistance()){
                    topQueue.add(word,distance);
                }
            } else {
                topQueue.add(word,distance);
            }
        }
        return topQueue;
    }