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 insamples
; otherwise, it will be initialized to be empty.In particular,
FreqDist()
returns an empty frequency distribution; andFreqDist(samples)
first creates an empty frequency distribution, and then callsupdate
with the listsamples
.Parameters: samples (Sequence) – The samples to initialize the frequency distribution with.