1 / 11

Introduction to NLTK

Introduction to NLTK. Text Analytics Giuseppe Attardi Università di Pisa. Installing NLTK. Download and Install http://nltk.org/install.html Download NLTK data >>> import nltk >>> nltk.download (). Jupyter Notebook.

Download Presentation

Introduction to 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. Introduction to NLTK Text Analytics Giuseppe Attardi Università di Pisa

  2. Installing NLTK • Download and Install • http://nltk.org/install.html • Download NLTK data >>> import nltk >>> nltk.download()

  3. Jupyter Notebook • Register with your UniPi credentials to activate your free account for a G Suite at: • this page. • Astart your Jupyter Notebook here: • https://attardi-4.di.unipiit:8000/

  4. NLTK

  5. NLTK • Suite of classes for several NLP tasks • Parsing, POS tagging, classifiers… • Several text processing utilities, corpora • Brown, Penn Treebank corpus… • Your data was divided into sentences using ‘punkt’

  6. NLTK • Text material • Raw text • Annotated Text • Tools • Part of speech taggers • Semantic analysis • Resources • WordNet, Treebanks

  7. Linguistic Tasks • Part of Speech Tagging • Parsing • Word Net • Named Entity Recognition • Information Retrieval • Sentiment Analysis • Document Clustering • Topic Segmentation • Classification • Authoring • Machine Translation • Summarization • Information Extraction • Spoken Dialog Systems • Natural Language Generation • Word Sense Disambiguation

  8. ‘import nltk’ • You will need to import the necessary modules to create objects and call member functions • import ~ include objects from pre-built packages • FreqDist, ConditionalFreqDist are in nltk.probability • PlaintextCorpusReader is in nltk.corpus

  9. Basic NLTK usage • Load the notebook ‘Intro to NLTK’ using: • File > Open > Text Anaytics > Intro to NLTK • Explore the examples by advancing through them with the button ►

  10. Exercise 1. • Run examples from Chapter 1 of NLTK book: • http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html

  11. Exercise 2. • Run examples from Chapter 3 of NLTK book • http://nltk.googlecode.com/svn/trunk/doc/book/ch03.html

More Related