def handle(self, *args, **options): b = BigramHistogram() if options['reset']: b.flush() if options['load']: b.load() if options['info']: print "Histogram stored under key %s. Total bigram count: %s, and __max: %s (%s)" % (b.key, b.count(), b.max(), b.max_bigram()) if options['inspect']: i = options['inspect'] print "Normalized score for %s: " % i, b.get(i) print "Non-normalized score for %s: " % i, b.get(i, normalize=False)