Compute the log probability of a sequence of words under the unsmoothed, maximum-likelihood `N`-gram language model.
(self, words, N)
| 298 | |
| 299 | @abstractmethod |
| 300 | def log_prob(self, words, N): |
| 301 | """ |
| 302 | Compute the log probability of a sequence of words under the |
| 303 | unsmoothed, maximum-likelihood `N`-gram language model. |
| 304 | """ |
| 305 | raise NotImplementedError |
| 306 | |
| 307 | @abstractmethod |
| 308 | def _log_ngram_prob(self, ngram): |