public int compare(String[] s1, String s2){ //Compare an array of words with a string
        int total = 0; //Create the total hits
        for(int i = 0; i < s1.length-1; i++){ //Loop through all of the words in the array
            String sub1 = ""; //Create a temporary string
            for(int count = i; count < (n + i)  && count < s1.length; count++){ //Go through the array and add the next n-words to be checked 
                if(count != 1) //Check to see if there isn't another word to be added
                    sub1 += s1[count] + " "; //Add the word plus a space
                else //If it is the last word
                    sub1+= s1[count]; //Add the word without a space
            }
            if(s2.indexOf(sub1) != -1) //Check to see if the phrase can be found
                total++; //Update the total
        }
        return total; //Return the total hits
    }