X hits on this document

Powerpoint document

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

127 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 views127
Page views127
Page last viewedWed Dec 07 18:29:13 UTC 2016
Pages47
Paragraphs392
Words1978

Comments