Skip to content

Instantly share code, notes, and snippets.

View joseeurquidi's full-sized avatar
🍇
Focusing

joseeurquidi

🍇
Focusing
View GitHub Profile
@benhoyt
benhoyt / ngrams.py
Created May 12, 2016 15:34
Print most frequent N-grams in given file
"""Print most frequent N-grams in given file.
Usage: python ngrams.py filename
Problem description: Build a tool which receives a corpus of text,
analyses it and reports the top 10 most frequent bigrams, trigrams,
four-grams (i.e. most frequently occurring two, three and four word
consecutive combinations).
NOTES