Giter Club home page Giter Club logo

Comments (4)

vivekamin avatar vivekamin commented on July 28, 2024

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'

from dblp.

RonnieGandhi avatar RonnieGandhi commented on July 28, 2024

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!

from dblp.

suziieett avatar suziieett commented on July 28, 2024

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.

from dblp.

vivekamin avatar vivekamin commented on July 28, 2024

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.

from dblp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.