static public function tscore(array $ngram, int $totalNgrams) : float
    {
        $var = self::setStatVariables($ngram, $totalNgrams);

        $term1 = $var['jointFrequency'] - (($var['leftFrequency'] * $var['rightFrequency'])/$totalNgrams);
        $term2 = sqrt(($var['jointFrequency']));

        return ( $term1 / $term2 );
    }