X hits on this document

Powerpoint document

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

133 views

0 shares

0 downloads

0 comments

35 / 47

More Complex Example

# What is the distribution of word lengths for              >>> ended_in_vowel = 0 #Did last word end in vowel?                               >>> freq_dist = FreqDist()                                           >>> for token in tokens:                                          ... if ended_in_vowel:             ... Freq_dist.inc(len(token.type()))

   ... ended_in_vowel=token.type()[-1].lower()

Document info
Document views133
Page views133
Page last viewedThu Dec 08 19:24:26 UTC 2016
Pages47
Paragraphs392
Words1978

Comments