python - Move nltk_data folder off C: drive -
i have been using python, utilizing nltk library. nltk has download packages after install total 5gb. since c: drive not large possible move drive? folder
the nltk automatically nltk_data folder in list of standard locations. on windows systems, these include following:
r"c:\nltk_data", r"d:\nltk_data, r"e:\nltk_data" in other words, can place @ top level in d: or e: drive , will found without further ado.
i'm pretty sure above covers use case, completeness:
other standard locations include nltk_data , lib\nltk_data in folder containing python distribution, , nltk_data in application data folder (environment variable %appdata%).
if none of above suit purposes, can specify additional (non-standard) locations search through environment variable nltk_data (a ;-separated list of folders on windows; or :-separated on unix systems), or modifying list nltk.data.path in running python program.
windows example:
set nltk_data=d:\some\path\to\nltk_data;e:\some\other\path unix example (bash etc.):
export nltk_data="$home/some/path/nltk_data:$home/library/nltk_data" or inside python:
import nltk nltk.data.path.append(r"d:\some\path\to\nltk_data")
Comments
Post a Comment