X hits on this document

Powerpoint document

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

175 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 views175
Page views175
Page last viewedFri Jan 20 23:11:49 UTC 2017
Pages47
Paragraphs392
Words1978

Comments