macks22 / dblp

Parse the dblp data into a structured format for experimentation.
MIT License
74 stars 22 forks source link

File "pipeline.py", line 9, import config ImportError: No module named config #19

Closed vivekamin closed 1 year ago

vivekamin commented 6 years ago

I have followed steps. Not able to find config.py

vivekamin commented 6 years ago

AttributeError: 'PorterStemmer' object has no attribute 'stem_word' Getting this error now.

raceback (most recent call last): File "pipeline.py", line 10, in import repdocs File "/home/avien/Documents/SML_dataset/dblp/pipeline/repdocs.py", line 10, in import doctovec File "/home/avien/Documents/SML_dataset/dblp/pipeline/doctovec.py", line 55, in stem_word = PorterStemmer().stem_word AttributeError: 'PorterStemmer' object has no attribute 'stem_word'

RonnieGandhi commented 5 years ago

use rather :

try:

This is a more efficient implementation of the Porter Stemmer,

# available on PyPi.
from stemming.porter2 import stem    

except ImportError:

Fall back to the slower stemmer available from NLTK

try:
    from nltk import PorterStemmer
    stem_word = PorterStemmer().stem_word
except ImportError:
    # You're out of luck; in practice, we should never get here because the
    # import from nltk.tokenize above should throw an ImportError first.
    # This is here in case someone decides to remove that.
    print 'No suitable Porter Stemmer could be found.'
    sys.exit(NO_PORTER_STEMMER_ERROR)

and where stem_word is used replace it with stem function!

suziieett commented 5 years ago

AttributeError: 'PorterStemmer' object has no attribute 'stem_word' Getting this error now.

raceback (most recent call last): File "pipeline.py", line 10, in import repdocs File "/home/avien/Documents/SML_dataset/dblp/pipeline/repdocs.py", line 10, in import doctovec File "/home/avien/Documents/SML_dataset/dblp/pipeline/doctovec.py", line 55, in stem_word = PorterStemmer().stem_word AttributeError: 'PorterStemmer' object has no attribute 'stem_word'

Are you able to solve this issue ?? I am facing the same issue.

vivekamin commented 5 years ago

AttributeError: 'PorterStemmer' object has no attribute 'stem_word' Getting this error now. raceback (most recent call last): File "pipeline.py", line 10, in import repdocs File "/home/avien/Documents/SML_dataset/dblp/pipeline/repdocs.py", line 10, in import doctovec File "/home/avien/Documents/SML_dataset/dblp/pipeline/doctovec.py", line 55, in stem_word = PorterStemmer().stem_word AttributeError: 'PorterStemmer' object has no attribute 'stem_word'

Are you able to solve this issue ?? I am facing the same issue.

Nope! I coded the required formatting conversion.