Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
[Brief description ]
- [more description]
- [more description]
- [more description]
| #!/usr/bin/env python | |
| try: | |
| # For Python 3.0 and later | |
| from urllib.request import urlopen | |
| except ImportError: | |
| # Fall back to Python 2's urllib2 | |
| from urllib2 import urlopen | |
| import json |
| """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 |