Last active
October 23, 2015 11:05
-
-
Save Cowa/774b58cbe1e4ebc0abaf to your computer and use it in GitHub Desktop.
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
val ngram = (List.fill(n - 1)("<s>") ++ tokens :+ "</s>") | |
.sliding(n) | |
.toList | |
// Same song | |
val ngramWithCount = ... | |
val ngramWithProbabilityFaster = ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment