473,467 Members | 1,604 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

error problems for import some copora with nltk

I did install the python 2.4 and nltk.
I am trying to follow the tutorial, but I kept getting error messages
about importing corpus as follows

================================================== =
from nltk.corpus import gutenberg


Traceback (most recent call last):
File "<pyshell#3>", line 1, in -toplevel-
from nltk.corpus import gutenberg
ImportError: cannot import name gutenberg
================================================== =

I got the data files under c:\\python24\nltk\
Do you know why I can't get the result?
Any help?

Thanks in advance,

Kyung in Texas

Jul 18 '05 #1
1 2641
<ek*********@gmail.com> wrote:
I did install the python 2.4 and nltk.
I am trying to follow the tutorial, but I kept getting error messages
about importing corpus as follows

================================================== =
from nltk.corpus import gutenberg


Traceback (most recent call last):
File "<pyshell#3>", line 1, in -toplevel-
from nltk.corpus import gutenberg
ImportError: cannot import name gutenberg
================================================== =

I got the data files under c:\\python24\nltk\
Do you know why I can't get the result?
Any help?


what happens if you import "nltk" ? if you still get an exception, you haven't
installed nltk in a proper way; double-checking the installation instructions might
help.

if importing nltk works, check if there's a "\python24\nltk\corpus\gutenberg.py"
or similar file.

if both the above are try, try doing this before importing the gutenberg module:

import sys
sys.path.insert(0, "c:/python24")

</F>

Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sam Crow | last post by:
Hello, having a little problem loading python modules.. here is the output from the interactive environment notice import sys worked correctly. when I do a search in the lib driectory for cgi i...
2
by: AdSR | last post by:
Hello, Nothing relevant found on Google for this, so I'm asking here. I wrote a short script that launches several threads (parallel download using urllib.urlretrieve in this case). Sometimes...
67
by: Steven T. Hatton | last post by:
Some people have suggested the desire for code completion and refined edit-time error detection are an indication of incompetence on the part of the programmer who wants such features. ...
2
by: Andante.in.Blue | last post by:
Our Access 97 database is a single-file (non-splitted, pure Access) hosted no a network server, accessed regularly by a handful of users around the office. Until recently (until the Great...
6
by: jasn | last post by:
Hello I am getting the following error message when I try and send an XML sting to a web service, I read somewhere that most web services prefer ascii and some throw errors when using unicode so...
1
by: Steven Bird | last post by:
NLTK — the Natural Language Toolkit — is a suite of open source Python modules, data sets and tutorials supporting research and development in natural language processing. It comes with 50k lines...
7
by: Dustin MacDonald | last post by:
Hi everyone. This is my first time posting to this newsgroup, and although I maintain my netiquette I might've missed something specific to the newsgroup, so hopefully you can avoid flaming me...
0
by: shahiz | last post by:
This the error i get when i try to run my program Error: Unable to realize com.sun.media.amovie.AMController@18b81e3 Basically i have a mediapanel class that initialize and play the media as...
5
by: hussainsaiger | last post by:
I am trying to convert a python module (that contains the use of NLTK.Corpus) by jythonc. It is not able to include nltk dependencies within the java class it creates. So when i use this class in...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.