Commits

Slavko Zitnik committed a1c2cc4

bugfix

Comments (0)

Files changed (1)

src/main/java/si/zitnik/research/iobie/algorithms/crf/feature/iterative/CoreferentMentionLabelFeatureFunctionGenerator.scala

 import scala.Array
 import si.zitnik.research.iobie.algorithms.crf.feature.packages.JointIterativeFeatureFunctionPackage
 import scala.collection.JavaConversions._
+import si.zitnik.research.iobie.domain.cluster.Cluster
 
 /**
  * Created with IntelliJ IDEA.
     def score = (example: Example, i: Int) => {
       IterativeFFUtil.getConstituent(example, i) match {
         case Some(cons) => {
-          val set = JointIterativeFeatureFunctionPackage.mentionToCorefCluster(cons).filter(_ != cons).map(_.get(otherConsLabelType).asInstanceOf[String]).toSet
+          val set = JointIterativeFeatureFunctionPackage.mentionToCorefCluster.getOrElse(cons, new Cluster()).filter(_ != cons).map(_.get(otherConsLabelType).asInstanceOf[String]).toSet
           //TODO: does it really remove cons from cluster
 
           if (set.contains(labelValue))  {