I am still having problems. I am a bit of a newbie.
(Pdb) from nltk.metrics import accuracy
(Pdb) print (nltk.tag.accuracy.__doc__)
*** AttributeError: 'module' object has no attribute 'accuracy'
(Pdb) dir(accuracy)
['__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__doc__', '__format__', '__get__', '__getattribute__', '__globals__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'func_closure', 'func_code', 'func_defaults', 'func_dict', 'func_doc', 'func_globals', 'func_name']
(Pdb)
(Pdb) print('The nltk version is {}.'.format(nltk.__version__))
The nltk version is 3.2.1.
(Pdb) import sys
(Pdb) print sys.version
2.7.12 (default, Sep 29 2016, 13:30:34)
[GCC 6.2.1 20160916 (Red Hat 6.2.1-2)]
(Pdb)