'''
Created on Nov 3, 2010

@author: alandavidson
'''

import random
import HTMLWriter

def get_popular_words(filename, word_count):
    """
    filename is a string.
    word_count is an int.
    return a list of (count, word) tuples, containing the word_count number of
    the most popular words in filename, where count is the number of times that 
    word occurs in the file. All words should be treated as lower case.
    """
    file = open(filename)
    # TODO: students fill this in
    file.close()  # Remember to close your files!
    # TODO: students fill this in
    return []

def make_word_cloud(in_filename, out_filename, word_count):
    """
    in_filename and out_filename are strings, denoting the input file and output file.
    word_count is an integer.
    We read in the contents of in_filename, then write a word cloud containing
    the word_count most popular words within in_filename to out_filename, in
    random order.
    """
    # TODO: students fill this in
    pass
    
def clean_up_size(frequency):
    """
    Given a frequency of how often a word occurs, return an integer denoting the
    size the word should be.
    - the minimum size is 6
    - the maximum size is 36
    - for every 15 occurrences of the word, increase its size by 2
    For example, if the word occurs at most 15 times, it should be in 6 point
    font. If it occurs 15 to 29 times, it should be in 8 point font. If it
    occurs 30 to 44 times, it should be in 10 point font.
    """
    # TODO: students fill this in
    return 0
    
if __name__ == "__main__":
    make_word_cloud("romeo.txt", "romeo_cloud.html", 100)
