The first step is to download and install NLTK. Running PythonThe simplest way to run Python is via IDLE, the Integrated Development Interface. It opens up a window and you can enter commands at the >>> prompt. You can also open up an editor with File -> New Window and type in a program, then run it using Run -> Run Module. Save your program to a file with a .py extension.
Check that the Python interpreter is listening by typing the following command at the prompt. It should print Monty Python! >>> print "Monty Python!" Check that NLTK is installed by typing "import nltk" at the prompt. Chapter 1 of the NLTK book suggests dozens of things to try.
Running NLTK's Graphical DemonstrationsOther DemonstrationsMost NLTK modules include demonstration code. Here are some examples involving tokenizing, stemming, and tagging: >>> import nltk Here are some more examples, involving parsing and semantic interpretation: >>> import nltk Online DocumentationYou can ask for help on any Python or NLTK object using the built-in help facility, e.g. help(list), help(nltk.parse). |






