public static String identifyWordFromFrequencyMatrix(double[][] currentCorrelationMatrix) throws Exception {

        int rowIndex = 0;
        int columnIndex = 0;

        double maxCorrelation = PearsonCorrelationCoefficientClass.getMaximumElement(currentCorrelationMatrix);

        // Get the row and column index of the maximum correlation coefficient
        for(int i=0;i<currentCorrelationMatrix.length;i++) {
            for(int j=0;j<currentCorrelationMatrix[0].length;j++) {
                if(maxCorrelation == currentCorrelationMatrix[i][j]) {
                    rowIndex = i;
                    columnIndex = j;
                }
            }
        }

        int indexOfWordOne = rowIndex + 1;
        int indexOfWordTwo = columnIndex + 1;

        // Column Index in frequency matrix for both obtained indexes gives us the index of words in uniqueWords array
        double frequencyMatrix[][] = FrequencyMatrixClass.generateFrequencyMatrix();
        int count = 0;
        int uniqueWordsIndexOne = 0;
        int uniqueWordsIndexTwo = 0;

        for(int i=0;i<frequencyMatrix.length;i++) {
            for(int j=0;j<frequencyMatrix[0].length;j++) {
                count++;
                if(count == indexOfWordOne)
                    uniqueWordsIndexOne = j;
                if(count == indexOfWordTwo)
                    uniqueWordsIndexTwo = j;
            }
        }

        // Now get the words from the list of unique words in all documents
        String[] uniqueWordsList = FrequencyMatrixClass.generateUniqueWordsFromAllDocuments();

        String wordOne = uniqueWordsList[uniqueWordsIndexOne];
        String wordTwo = uniqueWordsList[uniqueWordsIndexTwo];

        if(wordOne.equalsIgnoreCase(wordTwo))
            return wordOne;
        else
            return wordOne + " " + wordTwo;
    }