1 / 8

NLTK (Natural Language Tool Kit) nltk/

NLTK (Natural Language Tool Kit) http://www.nltk.org/. Unix for Poets (without Unix). NLTK: Unix for Poets (without Unix) Unix  Python. No need to buy the book Free online at http://www.nltk.org/book Homework #4 Read Chapter 1 http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html

channer
Download Presentation

NLTK (Natural Language Tool Kit) nltk/

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NLTK (Natural Language Tool Kit)http://www.nltk.org/ Unix for Poets (without Unix)

  2. NLTK: Unix for Poets (without Unix)Unix  Python • No need to buy the book • Free online at http://www.nltk.org/book • Homework #4 • Read Chapter 1 • http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html • Start with exercise 22 and go as far as you can • Exercise 23: Solve however you like • (no need to use for and if)

  3. Python def fact(x): if(x <= 1): return 1 else: return x * fact(x-1) • Exercise: Fibonacci in Python

  4. Introduction to Programming Traditional (Start with Definitions) Non-Traditional (Start with Examples) Recursion def fact(x): if(x <= 1): return 1 else: return x * fact(x-1) Streams: Unix Pipes Briefly mentioned Everything else • Constants: 1 • Variables:x • Objects: lists, arrays, matrices • Expressions: 1+x • Statements: print 1+x; • Conditionals: • If (x<=1) return 1; • Iteration • Functions • Recursion: • Streams:

  5. George Miller’s Example: Erode • Exercise: Use “erode” in a sentence: • My family erodes a lot. • to eat into or away; destroy by slow consumption or disintegration • Battery acid had eroded the engine. • Inflation erodes the value of our money. • Miller’s Conclusion: • Dictionary examples are more helpful than defs

  6. Installing • Chapter 01: pp. 1 - 4 • Python • NLTK • Data

  7. An Equivalence Relation • Partitions a set into several disjoint subsets • Called equivalence classes • All the elements in a class are equivalent • No element from one class is equivalent to an element from another • Example: Partition integers into two subsets • Even integers: 2,4,6… • Odd integers: 1,3,5… • Three Properties • Reflexive: xRx • Symmetric: xRyyRx • Transitive: xRy & yRzxRz • Canonical Elements: 1 & 2 • Computational Convenience

  8. A Partial Order • Subsets of {x,y,z} • Ordered by inclusion • Three properties • Reflexive: • xRx • Antisymmetric: • xRy⌃yRx • Transitivity: • xRy & yRzxRz

More Related