public static HashMap<String, Integer> findRepetition(ArrayList<Sentence> listOfSentences) {
		HashMap<String, Integer> repetitionValues = new HashMap<String, Integer>();
														// key - a word that is repeated;
													   // value - the number of repetitions
													  // in different sentence

		HashMap<String, Integer> map = new HashMap<String, Integer>();
											// key - a word that is repeated;
										   // value - the sentence number in which first met

		int indexOfSentence = 0; // index of current sentence

		for (Sentence s : listOfSentences) {

			for (Lexeme l : s.getListOfLexemes()) {
				if (l instanceof Word) { // if lexeme is a word	
					
					if (map.get(l.toString()) == null) {						
						// If the word is met for the first time
						
						map.put(l.toString(), indexOfSentence);
					} else {
						// If the word meets not for the first time
						
						if (map.get(l.toString()) != indexOfSentence) {
							// System.out.println(l.toString());

							if (repetitionValues.get(l.toString()) == null)
								repetitionValues.put(l.toString(), 2);
							else {
								// change the number of repetitions
								int w = repetitionValues.get(l.toString());
								repetitionValues.replace(l.toString(), w + 1);
								map.replace(l.toString(),indexOfSentence );
							}
						}
					}
				}
			}
			indexOfSentence++;
		}
		return repetitionValues;
	}