code: private static void 
          writeNeighborComparison(File neighborFile, 
                                  MultiMap<Double,String> mostSimilar, 
                                  SemanticSpace sspace) throws IOException {        
  
          PrintWriter pw = new PrintWriter(neighborFile);
          
          // print out the header so we know the comparison order
          StringBuffer sb = new StringBuffer(mostSimilar.size() * 10);
          for (Iterator<String> it = mostSimilar.values().iterator();
               it.hasNext();) {
              sb.append(it.next());
              if (it.hasNext()) 
                  sb.append(" ");
          }
          pw.println(sb.toString());
          
          // create an N x N table of how similar all the words are to each
          // other.
          for (String word : mostSimilar.values()) {
              sb = new StringBuffer(mostSimilar.size() * 10);
              sb.append(word).append(" ");
              
              // loop through all of the words
              for (String other : mostSimilar.values()) {
                  // determine how similar the two words are
                  double similarity = Similarity.cosineSimilarity(
                          sspace.getVector(word),
                          sspace.getVector(other));
                  sb.append(similarity).append(" ");
              }
              pw.println(sb.toString());
          }
          
          pw.close();
      }
docs: Write to the {@code neighborFile} the previously computed results of an N
  x N similarity comparison of all the neighbors for word.
  
  @param neighborFile the file to which the results of the comparison
  should be written
  @param mostSimilar a mapping from the similarity value to the neighbors
  of an interesting word that have the value.
  @param sspace the semantic