"""
author: Zack Schwartz (zacharyhschwartz@gmail.com)
date created: 12/5/2011
"""
from pymongo.code import Code

class MapReduce(object):
    def __init__(self):
        self.map_func = Code(open('helpers/map.js', 'r').read())
        self.reduce_func = Code(open('helpers/reduce.js', 'r').read())

    def begin_score():
        self.db.processed_tweets.map_reduce(self.map_func, self.reduce_func) 
