Yliopiston etusivulle In English
Helsingin yliopisto
CLT231: Introduction to Natural Language Processing - 2010-2011

Yhteystiedot

Nykykielten laitos

PL 24 (Unioninkatu 40)
00014 HELSINGIN YLIOPISTO

Puhelin +358 (09) 1911 (vaihde)
Faksi +358 (09) 191 28313

1. Getting Started with Texts.

  • Lecture notes
  • Further reading
  • Practical work
    • IDLE
      Learn about IDLE with One Day of IDLE Toying by Danny Yoo.
    • Open IDLE from the Start menu and try:
      >>> import nltk
      >>> from nltk.book import *
      
    • Concordances
      Choose an English word and see how it is used in each example text by making concordances as shown in Searching Text. Try a few other words. Can you find a word that is used frequently in one text but is never used in the other texts?
    • Generating Text
      Generate paragraphs in the style of each different example text, using generate() as shown at the end of Searching Text. Do the generation three times for each text, as it produces different output each time. Show someone else a generated paragraph, and ask them to guess which text you generated it from.
    • Counting Vocabulary
      How many words (tokens) are there in Moby Dick?
      How many different words (types) are there in the novel?
      How many times does the word the occur in the novel?
      What is this as a percentage of all the words in the novel?
  • NLTK demos (optional)
    • In IDLE, run this NLTK application:
      >>> nltk.app.rdparser()
      
    • Keep clicking Step for a while and try to see what's going on. Alternatively, click Autostep once and just watch.
    • Challenge: can you parse the whole sentence successfully using only the Expand, Match and Backtrack buttons?
    • In IDLE, run this NLTK application:
      >>> nltk.app.srparser()
      
    • Keep clicking Step for a while and try to see what's going on.
    • Challenge: can you parse the whole sentence successfully using only the Shift and Reduce buttons?
© 2006-2010 Graham Wilcock

Hae laitoksen sivuilta:

Laitoksen etusivulle | Tiedekunnan etusivulle | Yliopiston etusivulle

Copyright © 2003-2005 Helsingin yliopisto. Kaikki oikeudet pidätetään.