Created
July 5, 2011 20:03
-
-
Save acrymble/1065782 to your computer and use it in GitHub Desktop.
Python ngram
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
| #useGetNGrams.py | |
| import obo | |
| wordstring = 'it was the best of times it was the worst of times ' | |
| wordstring += 'it was the age of wisdom it was the age of foolishness' | |
| allMyWords = wordstring.split() | |
| print obo.getNGrams(allMyWords, 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment