code: private double extractScore(String clutoOutput) throws IOException {
          double score = 0;
          BufferedReader reader =
              new BufferedReader(new StringReader(clutoOutput));
          String line = null;
          while ((line = reader.readLine()) != null) {
              if (line.contains("[I2=")) {
                  String[] split = line.split("=");
                  int endOfIndex = split[1].indexOf("]");
                  return Double.parseDouble(split[1].substring(0, endOfIndex));
              }
          }
          return 0;
      }
docs: Extracts the score of the objective function for a given set of
  clustering assignments.  This requires scraping the output from Cluto to
  find the line specifiying the score.