Skip to content

Instantly share code, notes, and snippets.

@Jamil
Created December 23, 2016 22:16
Show Gist options
  • Select an option

  • Save Jamil/d240bf31cc06c52ee18c8ebc9d351463 to your computer and use it in GitHub Desktop.

Select an option

Save Jamil/d240bf31cc06c52ee18c8ebc9d351463 to your computer and use it in GitHub Desktop.
Demo of bigram model use
x = ["the", "quick", "brown", "fox", "jumps", "over", "a", "lazy", "dog", "who", "jumps", "below", "the", "white", "rabbit", "who", "jumps", "over", "the", "green", "turtle", "who", "jumps", "above", "the", "lazy", "cat", "who"]
grams = bigrams $ bigrammap x
genx = gen grams pseudorand 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment