public void sentencesWithSameWords(String resultFilePath)
            throws IOException{
        if(text == null) return;
        int maxNumberOfWords = 0;
        ArrayList<Sentence> result = new ArrayList<Sentence>();
        for(int i = 0; i < text.numberOfParagraphs(); i++){
            Paragraph currParagraph = text.getParagraph(i);
            for(int j = 0; j < currParagraph.numberOfSentences(); j++){
                Sentence currSentence = currParagraph.getSentence(j);
                int currMaxNumberOfSameWords = currSentence.getMaxNumberOfSameWords();
                if(currMaxNumberOfSameWords > maxNumberOfWords){
                    maxNumberOfWords = currMaxNumberOfSameWords;
                    result.clear();
                    result.add(currSentence);
                }
                else if(currMaxNumberOfSameWords == maxNumberOfWords){
                    result.add(currSentence);
                }
            }
        }
        out = new BufferedWriter(new FileWriter(resultFilePath));
        for(Sentence sentence : result){
            writeSentence(sentence);
            out.newLine();
        }
        out.flush();
    }