private static SpeechNBestList buildSpeechNBestList(List<String> correctSentence, BufferedReader wordReader, BufferedReader scoreReader, Set vocabulary) throws IOException {
      List<Double> scoreList = readScores(scoreReader);
      List<List<String>> sentenceList = readSentences(wordReader);
      List<List<String>> uniqueSentenceList = new ArrayList<List<String>>();
      Map<List<String>, Double> sentencesToScores = new HashMap<List<String>, Double>();
      List<String> tokenizedCorrectSentence = null;
      for (int i = 0; i < sentenceList.size(); i++) {
        List<String> sentence = sentenceList.get(i);
        if (! inVocabulary(sentence, vocabulary)) // && i < sentenceList.size()-1)
          continue;
        Double score = scoreList.get(i);
        Double bestScoreForSentence = sentencesToScores.get(sentence);
        if (!sentencesToScores.containsKey(sentence)) {
          uniqueSentenceList.add(sentence);
          if (equalsIgnoreSpaces(correctSentence, sentence)) {
            if (tokenizedCorrectSentence != null) {
              System.out.println("WARNING: SPEECH LATTICE ERROR");
            }
            tokenizedCorrectSentence = sentence;
          }
        }
        if (bestScoreForSentence == null || score > bestScoreForSentence) {
          sentencesToScores.put(sentence, score);
        }
      }
      if (uniqueSentenceList.isEmpty())
        return null;
      if (tokenizedCorrectSentence == null)
        return null;
      return new SpeechNBestList(tokenizedCorrectSentence, uniqueSentenceList, sentencesToScores);
    }