Created
June 22, 2011 09:43
-
-
Save bpgergo/1039777 to your computer and use it in GitHub Desktop.
Ngrams with coroutines 3
This file contains hidden or 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
counts = [[10 for i in xrange(k)] for i in xrange(k)] | |
bigrams = filter_chars(accepted_chars, ngrams(2, counter(counts))) | |
for c in open('big.txt').read().decode(enc): bigrams.send(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment