public double[][] getCosineSimilarity(int type) {
        RelatednessCalculator rCalculator = rcs[type];
        double[][] adjMatrix = new double[numSentences][numSentences];
        for (int i = 0; i < numSentences; ++i) {
            List<String> vectorI = lemmatizedSentences.get(i);
            for (int j = i; j < numSentences; j++) {
                List<String> vectorJ = lemmatizedSentences.get(j);
                double totalSimI = 0.0;
                double totalSimJ = 0.0;
                for (String wordI : vectorI) {
                    double maxSimWord = 0.0;
                    for (String wordJ : vectorJ) {
                        double sim = rCalculator.calcRelatednessOfWords(wordI, wordJ);
                        maxSimWord = sim > maxSimWord ? sim : maxSimWord;
                    }
                    totalSimI += maxSimWord;
                }
                for (String wordJ : vectorJ) {
                    double maxSimWord = 0.0;
                    for (String wordI : vectorI) {
                        double sim = rCalculator.calcRelatednessOfWords(wordJ, wordI);
                        maxSimWord = sim > maxSimWord ? sim : maxSimWord;
                    }
                    totalSimJ += maxSimWord;
                }
                adjMatrix[i][j] = adjMatrix[j][i] = (totalSimI + totalSimJ) / 2.0;
            }
        }
        return adjMatrix;
    }