public function getCondProb($term,$class)
    {
        if (!isset($this->condprob[$term][$class])) {
            
            return isset($this->unknown[$class])
                ? $this->unknown[$class]
                : 0;

        } else {
            return $this->condprob[$term][$class];
        }
    }