X hits on this document

Powerpoint document

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

139 views

0 shares

0 downloads

0 comments

40 / 47

Example (continued)

# How does initial letter affect word length?      for token in tokens:                                     outcome = len(token.type())

  ...            condition = token.type()[0].lower()            ...           cfdist[condition].inc(outcome)

What are the condition and the outcome?

Condition = the initial letter of the token

Outcome = its word length

Document info
Document views139
Page views139
Page last viewedSat Dec 10 15:05:12 UTC 2016
Pages47
Paragraphs392
Words1978

Comments