def measure(self):
        """calculates the scalar length of the trigram vector and
        stores it in self.length."""
        total = 0
        for y in self.lut.values():
            total += sum([ x * x for x in y.values() ])
        self.length = total ** 0.5
calculates the scalar length of the trigram vector and
        stores it in self.length.
recipes/Python/326576_Language_detectiusing_character/recipe-326576.py