code: private void printWordNeighbors(String dateString,
                                      SemanticSpace semanticPartition) 
              throws IOException {
          
          LOGGER.info("printing the most similar words for the semantic partition" +
                      " starting at: " + dateString);
  
          NearestNeighborFinder nnf = 
              new SimpleNearestNeighborFinder(semanticPartition);
  
          // generate the similarity lists
          for (String toExamine : interestingWords) {
              SortedMultiMap<Double,String> mostSimilar = 
                  nnf.getMostSimilar(toExamine, interestingWordNeighbors);
  
              if (mostSimilar != null) {
                  File neighborFile = 
                      new File(outputDir, toExamine + "-" + dateString + ".txt");
                  neighborFile.createNewFile(); // iff it doesn't already exist
                  
                  File neighborComparisonFile = new File(outputDir,
                      toExamine + "_neighbor-comparisons_" + dateString + ".txt");
                  neighborComparisonFile.createNewFile(); // see above comment
                      
  
                  PrintWriter pw = new PrintWriter(neighborFile);
                  for (String similar : mostSimilar.values()) {
                      pw.println(similar);
                  }
                  pw.close();
  
                  if (compareNeighbors) {                                
                      // Print an N x N comparison between all of the most similar
                      // words.  This gives an indication of whether any of the
                      // words might be outliers.
                      writeNeighborComparison(neighborComparisonFile, 
                                              mostSimilar, semanticPartition);
                  }
              }
          }    
      }
docs: Using the {@link wordToTemporalSemantics} set and input parameters,
  calculates the shift in each word's semantic vector per recorded time
  period and also prints out the nearest neighbors to each word for each
  time period.
  
  @param dateString the string that encodes the date of the semantic partition.
  This will be used as a part of the file name to indicate when the
  shifts occurred.
  @param semanticPartition the current semantic that will be used to identify
  the neighbors of each interesting word