gerdm / python_uma

Repositorio de código para clases de Python impartidas en la Universidad Marista
0 stars 16 forks source link

DUDA!!! #29

Open antoniosguevara22 opened 5 years ago

antoniosguevara22 commented 5 years ago

Andaba bien feliz haciendo mi trabajo final y al momento de correrlo Aparece esto :(

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-3b02390c7677> in <module>()
      1 import nltk
----> 2 nltk.download()

~\Anaconda3\lib\site-packages\nltk\downloader.py in download(self, info_or_id, download_dir, quiet, force, prefix, halt_on_error, raise_on_error)
    659             # function should make a new copy of self to use?
    660             if download_dir is not None: self._download_dir = download_dir
--> 661             self._interactive_download()
    662             return True
    663 

~\Anaconda3\lib\site-packages\nltk\downloader.py in _interactive_download(self)
    980         if TKINTER:
    981             try:
--> 982                 DownloaderGUI(self).mainloop()
    983             except TclError:
    984                 DownloaderShell(self).run()

~\Anaconda3\lib\site-packages\nltk\downloader.py in __init__(self, dataserver, use_threads)
   1240         self._init_menu()
   1241         try:
-> 1242             self._fill_table()
   1243         except HTTPError as e:
   1244             showerror('Error reading from server', e)

~\Anaconda3\lib\site-packages\nltk\downloader.py in _fill_table(self)
   1536             items = self._ds.models()
   1537         elif self._tab == 'collections':
-> 1538             items = self._ds.collections()
   1539         else:
   1540             assert 0, 'bad tab value %r' % self._tab

~\Anaconda3\lib\site-packages\nltk\downloader.py in collections(self)
    503 
    504     def collections(self):
--> 505         self._update_index()
    506         return self._collections.values()
    507 

~\Anaconda3\lib\site-packages\nltk\downloader.py in _update_index(self, url)
    828 
    829         # Download the index file.
--> 830         self._index = nltk.internals.ElementWrapper(
    831             ElementTree.parse(urlopen(self._url)).getroot())
    832         self._index_timestamp = time.time()

AttributeError: module 'nltk' has no attribute 'internals'
antoniosguevara22 commented 5 years ago

@gerdm AYUDAA PARFAVARRRRR!!!

antoniosguevara22 commented 5 years ago

@gerdm import nltk nltk.download() from nltk.corpus import stopwords from word.tokenize import word_tokenize

problema= input("Escriba su problema:") stop_words=set(stopwords.words("español")) palabras = words_tokenize(problema) problema_fil = []

for x in palabras : if x not in stop_words: problema_fil.append(x)

print(problema_fil)

AYUDA PORFA## Aparte no me deja subir nada que pasa con github

gerdm commented 5 years ago

Hola @elantonioguevara99.

¿Cómo instalaste nltk?

antoniosguevara22 commented 5 years ago

De una página de Internet que investigue!!

gerdm commented 5 years ago

¿Lo instalaste desde pip, @elantonioguevara99?

pip install nltk