fabianvf/python-rake

README.md Issue With Python 3.5

Closed this issue · 1 comments

When I sudo pip3 install python-rake on Ubuntu Gnome 16.04.2, (v1.0.7 according to pip3 freeze), when using iPython 3.5, the README.md files usage instructions seem like they're wrong

Instructions:

import RAKE
Rake = RAKE.Rake([path_to_your_stopwords_file]);
# You can use one of the stoplists included in the repository under stoplists/
Rake.run(text);

What I tried:

import RAKE
rake = RAKE.Rake('/home/justin/Documents/python_rake/stoplists/SmartStoplist.txt')
text = "Compatibility of systems of linear constraints over the set of natural numbers."
rake.run(text)

Output:

runfile('/home/justin/Documents/rake test.py', wdir='/home/justin/Documents')
Traceback (most recent call last):

  File "<ipython-input-42-c9f95de7800a>", line 1, in <module>
    runfile('/home/justin/Documents/rake test.py', wdir='/home/justin/Documents')

  File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 880, in runfile
    execfile(filename, namespace)

  File "/usr/local/lib/python3.5/dist-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/home/justin/Documents/rake test.py", line 3, in <module>
    rake = RAKE.Rake('/home/justin/Documents/python_rake/stoplists/SmartStoplist.txt')

AttributeError: module 'RAKE' has no attribute 'Rake'

Issue caused by objects of conflicting name left in ipython console. Closed. Sorry all.