def perplexity(self, text):
    """
    Calculates the perplexity of the given text.
    This is simply 2 ** cross-entropy for the text.
    :param text: words to calculate perplexity of
    :type text: Iterable[str]
    """

    return pow(2.0, self.entropy(text))