DEV Community

loading...

Discussion on: Build a quick Summarizer with Python and NLTK

Collapse
vnurhaqiqi profile image
Viqi Nurhaqiqi

Hi..
I have a problem with that :

sumValues += sentenceValue[sentence]
TypeError: unsupported operand type(s) for +=: 'int' and 'str'

Collapse
davidisrawi profile image
David Israwi Author

Hi Viqi. Seems like you are storing a string in your sentenceValue dictionary instead of an actual value, it is supposed to be an int instead. Fixing that may solve the problem!

Forem Open with the Forem app