nltk.FreqDist.__init__

FreqDist.__init__(samples=None)[source]

Construct a new frequency distribution. If samples is given, then the frequency distribution will be initialized with the count of each object in samples; otherwise, it will be initialized to be empty.

In particular, FreqDist() returns an empty frequency distribution; and FreqDist(samples) first creates an empty frequency distribution, and then calls update with the list samples.

Parameters:samples (Sequence) – The samples to initialize the frequency distribution with.