X hits on this document

Powerpoint document

Python for NLP and the Natural Language Toolkit - page 28 / 47

159 views

0 shares

0 downloads

0 comments

28 / 47

Word Length Freq. Distribution Example

from nltk.token import WSTokenizer                          # Extract a list of words from the corpus                    # Construct a frequency distribution of word lengths wordlen_freqs = SimpleFreqDist()                             wordlen_freqs.inc(len(token.type()))                       # Extract the set of word lengths found in the corpus wordlens = wordlen_freqs.samples()

Document info
Document views159
Page views159
Page last viewedWed Jan 18 22:37:19 UTC 2017
Pages47
Paragraphs392
Words1978

Comments