Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Import Problem - Please help

Reply
Thread Tools

Import Problem - Please help

 
 
newb.py
Guest
Posts: n/a
 
      09-08-2009
I am trying to learn NLP with Python and am getting the following
error when trying to do an import statement:

>>> import nltk
>>> import re
>>> from nltk_lite.utilities import re_show

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nltk_lite.utilities

I have installed nltk already and have a problem where I need to
remove vowels from text. I think I need this module to complete it.

Any help would be much appreciated.

Thanks.

 
Reply With Quote
 
 
 
 
newb.py
Guest
Posts: n/a
 
      09-08-2009
On Sep 7, 5:40*pm, "newb.py" <seanm...@gmail.com> wrote:
> I am trying to learn NLP with Python and am getting the following
> error when trying to do an import statement:
>
> >>> import nltk
> >>> import re
> >>> from nltk_lite.utilities import re_show

>
> Traceback (most recent call last):
> * File "<stdin>", line 1, in <module>
> ImportError: No module named nltk_lite.utilities
>
> I have installed nltk already and have a problem where I need to
> remove vowels from text. I think I need this module to complete it.
>
> Any help would be much appreciated.
>
> Thanks.


My version of Python is 2.6.2. It seems that might make a difference
here, but I can't figure it out. Again, any help would be fantastic.

Thanks.
 
Reply With Quote
 
 
 
 
Ned Deily
Guest
Posts: n/a
 
      09-08-2009
In article
<8119a298-4660-4680-b460->,
"newb.py" <> wrote:
> On Sep 7, 5:40*pm, "newb.py" <seanm...@gmail.com> wrote:
> > I am trying to learn NLP with Python and am getting the following
> > error when trying to do an import statement:
> >
> > >>> import nltk
> > >>> import re
> > >>> from nltk_lite.utilities import re_show

> >
> > Traceback (most recent call last):
> > * File "<stdin>", line 1, in <module>
> > ImportError: No module named nltk_lite.utilities


Guessing from the current documentation, try replacing the third line
with:

>>> from nltk.util import re_show


--
Ned Deily,


 
Reply With Quote
 
newb.py
Guest
Posts: n/a
 
      09-08-2009
On Sep 7, 6:55*pm, Ned Deily <n...@acm.org> wrote:
> In article
> <8119a298-4660-4680-b460-0924c9baa...@e4g2000prn.googlegroups.com>,
>
> *"newb.py" <seanm...@gmail.com> wrote:
> > On Sep 7, 5:40*pm, "newb.py" <seanm...@gmail.com> wrote:
> > > I am trying to learn NLP with Python and am getting the following
> > > error when trying to do an import statement:

>
> > > >>> import nltk
> > > >>> import re
> > > >>> from nltk_lite.utilities import re_show

>
> > > Traceback (most recent call last):
> > > * File "<stdin>", line 1, in <module>
> > > ImportError: No module named nltk_lite.utilities

>
> Guessing from the current documentation, try replacing the third line
> with:
>
> >>> from nltk.util import re_show

>
> --
> *Ned Deily,
> *n...@acm.org


Fantastic. Thanks so much!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem(s) with import from parent dir: "from ../brave.py import sir_robin" per9000 Python 7 02-27-2006 06:36 PM
Problem with import "from omniORB import CORBA, PortableServer" Stefan Seefeld Python 3 04-11-2005 08:54 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM
HELP! HELP! PLEASE, PLEASE, PLEASE tpg comcntr Computer Support 11 02-15-2004 06:22 PM
please help... ...me learn C++ please please please :) KK C++ 2 10-14-2003 02:08 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57