nltk.DictionaryProbDist.__init__

DictionaryProbDist.__init__(prob_dict=None, log=False, normalize=False)[source]

Construct a new probability distribution from the given dictionary, which maps values to probabilities (or to log probabilities, if log is true). If normalize is true, then the probability values are scaled by a constant factor such that they sum to 1.

If called without arguments, the resulting probability distribution assigns zero probability to all values.