0

I am working with nltk in python. I imported the package and downloaded the additional data just fine, but I want to be able to append a new directory to store nltk_data.

When I tried this fix found at this link (How to config nltk data directory from code?)

nltk.data.path.append("path")

I received this error:

AttributeError: 'str' object has no attribute 'append'

What am I doing wrong?

agdeal
  • 103
  • 7

1 Answers1

0

you can try checking what nltk.data.path stores. most probably you assigned the path as string (may be in a notebook session) nltk.data.path.append = "folder path" (this is incorrect way)

you should first clear your session or restart your session if you made above change.

mlguy
  • 11
  • 2