Commented version of docclass.py from Seagaram's Programming Collective Intelligence