This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Ander Martinez Sanchez | |
from __future__ import division, print_function | |
from math import exp, log | |
from collections import Counter | |
def ngram_count(words, n): | |
if n <= len(words): |