

def lang_dists(self, text):
    ' Calculate the "out-of-place" measure between\n            the text and all languages '
    distances = {
        
    }
    profile = self.profile(text)
    for lang in self._corpus._all_lang_freq.keys():
        lang_dist = 0
        for trigram in profile:
            lang_dist += self.calc_dist(lang, trigram, profile)
        distances[trigram] = lang_dist
    return distances

dataset/ETHPy150Open nltk/nltk/nltk/classify/textcat.py TextCat.lang_dists/VarMisuse@72/117 `lang`->`trigram`