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];
        }
    }
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];
        }
    }
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 ] ; } }
Return the conditional probability of a term for a given class.

@param  string $term  The term (word, feature id, ...)
@param  string $class The class
@return float
Return the conditional probability of a term for a given class .