text: Title: nltk.lm.api entropy formula source? 
  Body: Hi! I've been experimenting with training and testing a standard trigram language model on my own dataset. Upon investigating the `entropy` method of the LM class, I was a bit confused. The [docs](https://www.nltk.org/api/nltk.lm.api.html#nltk.lm.api.LanguageModel.entropy) only mention a very brief description: "Calculate cross-entropy of model for given evaluation text."
  
  It seems to me that this entropy measure just **averages the ngram negative log probability** (so trigram in my case) and **makes it positive** by multiplying by -1:
  ```python
  def _mean(items):
      """Return average (aka mean) for sequence of items."""
      return sum(items) / len(items)
  
  def entropy(self, text_ngrams):
      """Calculate cross-entropy of model for given evaluation text.
  
      :param Iterable(tuple(str)) text_ngrams: A sequence of ngram tuples.
      :rtype: float
  
      """
      return -1 * _mean(
          [self.logscore(ngram[-1], ngram[:-1]) for ngram in text_ngrams]
      )
  ```
  **So my general question is: Where does this formula for entropy stem from? Is there any paper referencing the method?** I'm just a bit stuck with the different versions of entropy that exist and I don't know which one is used here (and therefore I don't know how to interpret it correctly).
  
  ### Other formulas of entropy/perplexity
  
  As a formula I know the [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) which in Python would be:
  ```python
  def shannon_entropy(self, text_ngrams):
      return -1 * sum(
          [self.score(ngram[-1], ngram[:-1]) * self.logscore(ngram[-1], ngram[:-1]) for ngram in text_ngrams]
      )
  ```
  
  And there's also the perplexity formula of [Jurafsky](https://www.youtube.com/watch?v=NCyCkgMLRiY), which returns a different score than `lm.perplexity` (which is 2**entropy):
  ```python
  from numpy import prod
  
  def jurafsky_perplexity(self, text_ngrams):
      problist = [self.score(ngram[-1], ngram[:-1]) for ngram in text_ngrams]
      return pow(prod(problist), -1/len(problist)
  
  ```
  Thanks!
  
  PS: My apologies if this issue lacks some information - I don't often open issues on Github 😅  Let me know if I need to update something! 
  
  UPDATE: my Python implementation of the Jurafsky perplexity was totally wrong as I had quickly written it. I've updated it to reflect the actual scores from the web lecture.