On Tue, Aug 17, 2010 at 3:04 PM, Gaurav Kalra <[email protected]> wrote:
> Hi. > I have been trying to learn NLTK (http://www.nltk.org/) following > instructions over: > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > > The point at which I am stuck is using the function dispersion_plot() ( > > http://nltk.googlecode.com/svn/trunk/doc/api/nltk.draw.dispersion-module.html#dispersion_plot > ) > > Here is the output of yolk: > PyYAML - 3.09 - active > Python - 2.6.5 - active development > (/usr/lib/python2.6/lib-dynload) > distribute - 0.6.10 - active > matplotlib - 1.0.0 - active > nltk - 2.0b9 - active > numpy - 1.4.1 - active > pip - 0.7.2 - active > wsgiref - 0.1.2 - active development (/usr/lib/python2.6) > yolk - 0.4.1 - active > > > I guess that dispersion_plot() requires matplotlib and numpy, which are > already active but, running the function is not generating any dispersion > graph as showed over here: > http://nltk.googlecode.com/svn/trunk/doc/book/ch01.html > Have you got any error message. Which version of NLTK you are using Try this from nltk import * from nltk.book import * text4.dispersion_plot(["citizens", "democracy", "freedom", "duties", "America"]) If Numpy and matplotlib is present it will work. -- ********************************** JAGANADH G http://jaganadhg.freeflux.net/blog _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
