def test(): probabilities.context = splitContext() x = OrderedDict( sorted(probabilities.classify("dark side".split()).iteritems(), key=operator.itemgetter(1), reverse=False)) print x print "probabilities.maxLikelyHood(x) = ", probabilities.maxLikelyHood(x)
def test(): probabilities.context = splitContext() x = OrderedDict(sorted(probabilities.classify("dark side".split()).iteritems(),key=operator.itemgetter(1),reverse=False)) print x print "probabilities.maxLikelyHood(x) = ",probabilities.maxLikelyHood(x)
def basicTest(): probabilities.context = splitContext() print probabilities.classify("desert of real".split())