Commits

Slavko Zitnik committed 4eb02ea

coref cluster printout

Comments (0)

Files changed (1)

src/main/java/si/zitnik/research/iobie/core/coreference/test/CoreferenceEvaluation.scala

  */
 object CoreferenceEvaluation {
 
+  def printClusters(real: ArrayBuffer[HashSet[Cluster]], tagged: ArrayBuffer[HashSet[Cluster]]) {
+    if (real.size <= 10) {
+      println("REAL:\n\t"+real)
+      println("TAGGED:\n\t"+tagged)
+    }
+  }
+
   def clusterResults(classifier: CorefClassifier, mentionExamples: Examples, print: Boolean = true) = {
     val allRealClusters = TaggedClusterer.doClustering(mentionExamples, ommitSingles = false)
     val allTaggedClusters = classifier.classifyClusters(mentionExamples)
     //CorefVisualizer.run(mentionExamples, allRealClusters, allTaggedClusters)
 
 
+    printClusters(allRealClusters, allTaggedClusters)
+
+
     val F = new ClusterStatistics().stat(allRealClusters, allTaggedClusters)
     if (print)
     println("Results Pairwise: " + F)