Module Expr Str Import alias ImportFrom alias identifier ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad NameLoad NameLoad Num decorator_list decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr
N/A N/A 
Key space and value space change in preparation for document frequency.

To execute this mapper and associated reducer on Hadoop Streaming use the
following command:

    $ hadoop jar $HADOOP_HOME/share/hadoop/tools/lib/hadoop-streaming-*.jar         -input reuters_term_frequency         -output reuters_document_term_frequency         -mapper mapper2.py         -reducer reducer2.py         -file mapper2.py         -file reducer2.py         -file framework.py

The output should be the word key and association of documents, keeping the
term frequency for use later in the algorithm.
 N/A sys ast literal_eval make_tuple framework Mapper DocumentTermsMapper N/A Mapper N/A map N/A N/A self N/A N/A N/A line self N/A N/A N/A key tf N/A N/A line split N/A self sep N/A tf N/A int tf N/A N/A word docid N/A make_tuple key N/A N/A N/A self emit word N/A docid tf 1 N/A N/A N/A N/A __name__ __main__ N/A N/A mapper N/A DocumentTermsMapper N/A sys stdin N/A N/A N/A mapper map