1 / 10

Lecture 2 Python Regular Expression

Lecture 2 Python Regular Expression. CSCE 771 Natural Language Processing. Topics Overview Readings: Chapters 1,2. January 16, 2013. Overview. Last Time Lec01- slides 1-31, 49-51 NLTK install Today Python Regular Expresssions Lec01 slides 32- NLTK book

zamora
Download Presentation

Lecture 2 Python Regular Expression

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. Lecture 2 Python Regular Expression CSCE 771 Natural Language Processing • Topics • Overview • Readings: Chapters 1,2 January 16, 2013

  2. Overview • Last Time • Lec01- slides 1-31, 49-51 NLTK install • Today • Python Regular Expresssions Lec01 slides 32- • NLTK book • http://www.amazon.com/Natural-Language-Processing-Python-Steven/dp/0596516495/ref=cm_cr_pr_pb_t • Online - http://nltk.org/book/ • NLTK corpora http://nltk.org/nltk_data/

  3. NLP in Python vs other Programming Languages (Preface) • import sys • for line in sys.stdin: • for word in line.split(): • if word.endswith('ing'): • print word • Perl • Prolog • Java • C, Lisp, ruby, haskell

  4. The Python Tutorial • http://docs.python.org/2/tutorial/ • Python is: • Interpreted • Dynamically typed

  5. Python Basic Data Types • Strings • Integers • Floats • Lists • Dictionaries

  6. Lists • >>> a = ['spam', 'eggs', 100, 1234] • >>> a • ['spam', 'eggs', 100, 1234]

  7. Dictionaries

More Related