On Mar 7, 2022, at 14:58, Robert Wasserman <robertwasser...@me.com> wrote:
> Thank you so much for responding to my email.   I’ve spent hours and searched 
> for other forms of the instructions for using NLTK,

You're welcome but, in the future, please reply to the mailing list so that 
everyone can participate and benefit. I've CC-ed this reply.

> Under the lines that loaded Python 10.3.1   Python 10.3.1 Header, I got the 
> >>>  prompt and I assumed that I could continue with in Python3 by typing 
> Python or Python3 but neither worked
>  and  the  from NLTK.book.import  *  returned the message printed below
>   import NLTK and followed that at the next  >>>  prompt with  NLTK.downoad() 
> 
> 
> But did not get the material in Figure   (the figure headed with Collectcions 
> , Corpora  Models All Packages etc.
> 
> From the >>> prompt      tried.    >>>from NLTK.book import *   
> 
> Long ago, I recall having gone through the same process when using Python2.7 
> or perhaps 2.5 and got the data and was able to run Python and then the 
> >>>from NLTK.book import *.                                    
>  
> …and then was able to type the commands such as text1(Moby Dick) and the 
> other texts which I could then use with commands such as 
> >>>text1.concordance(“monstrous”).     Etc
> 
> But when I used IDLE  and brought up the Python3  prompt, it seemed that 
> Python3 loaded properly but as not able to act on perform commands.  The 
> command line responded that 
> To my effort to type “from NLTK.book. import *      
> With.    Last login: Sun Mar  6 14:49:42 on ttys000
> (base) robertwasserman@Roberts-MacBook-Pro ~ % python
> Python 3.9.7 (default, Sep 16 2021, 08:50:36) 
> [Clang 10.0.0 ] :: Anaconda, Inc. on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from nltk.book.import *
>   File "<stdin>", line 1
>     from nltk.book.import *
>                    ^
> SyntaxError: invalid syntax
> >>> 

The syntax error is from an extra ".". Instead, try:

from nltk.book import *

--
  Ned Deily
  n...@python.org -- []

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to