Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Use correct canonical path for nltk_data

amo13c4dbd58efd09
diff --git a/Dockerfile b/Dockerfile
index b616c70e7..687d993c7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -234,9 +234,9 @@ RUN set -eux \
&& echo "Installing Python requirements" \
&& python3 -m pip install --default-timeout=1000 --no-cache-dir --requirement requirements.txt \
&& echo "Installing NLTK data" \
- && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" snowball_data \
- && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" stopwords \
- && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/local/share/nltk_data" punkt \
+ && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" snowball_data \
+ && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" stopwords \
+ && python3 -W ignore::RuntimeWarning -m nltk.downloader -d "/usr/share/nltk_data" punkt \
&& echo "Cleaning up image" \
&& apt-get -y purge ${BUILD_PACKAGES} \
&& apt-get -y autoremove --purge \
diff --git a/docs/configuration.md b/docs/configuration.md
index 1b361f9aa..873db795e 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -179,7 +179,7 @@ Previously, the location defaulted to `PAPERLESS_DATA_DIR/nltk`.
Unless you are using this in a bare metal install or other setup,
this folder is no longer needed and can be removed manually.
-Defaults to `/usr/local/share/nltk_data`
+Defaults to `/usr/share/nltk_data`
## Logging
diff --git a/src/paperless/settings.py b/src/paperless/settings.py
index 79a7a553b..c5bb4801c 100644
--- a/src/paperless/settings.py
+++ b/src/paperless/settings.py
@@ -178,7 +178,7 @@ THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails")
DATA_DIR = __get_path("PAPERLESS_DATA_DIR", os.path.join(BASE_DIR, "..", "data"))
-NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/local/share/nltk_data")
+NLTK_DIR = __get_path("PAPERLESS_NLTK_DIR", "/usr/share/nltk_data")
TRASH_DIR = os.getenv("PAPERLESS_TRASH_DIR")