public void loadInput(String inFile, int linesToRead)
            throws IOException
    {
        int lines = readLines(inFile);
        if (linesToRead != -1 && linesToRead < lines) {
            lines = linesToRead;
        }
        word1 = new String[lines];
        word2 = new String[lines];
        BufferedReader br = null;
        try {
            br = new BufferedReader(new FileReader(new File(inFile)));
            String line = null;
            int i = 0;
            while ((line = br.readLine()) != null && i < linesToRead) {
                line = line.trim();
                String[] tokens = line.split("\\s+");
                word1[i] = tokens[0];
                word2[i] = tokens[1];
                i++;
            }
        } finally {
            if (br != null)
                br.close();
        }
    }