The [patch-paperless.conf.example](https://github.com/freebsd/freebsd-ports/blob/ddf83690e4171846f72b6872deaf487199ee9504/deskutils/py-paperless-ngx/files/patch-paperless.conf.example#L59) patch file adds: > +NLTK_DIR=/var/db/paperless/nltk_data But the directory that is actually used throughout the patch is: > /var/db/paperless/nltkdata Examples: - [Makefile](https://github.com/freebsd/freebsd-ports/blob/ddf83690e4171846f72b6872deaf487199ee9504/deskutils/py-paperless-ngx/Makefile#L157) - [pkg-plist](https://github.com/freebsd/freebsd-ports/blob/ddf83690e4171846f72b6872deaf487199ee9504/deskutils/py-paperless-ngx/pkg-plist#L2868) - [files/paperless-ngx.7.in](https://github.com/freebsd/freebsd-ports/blob/ddf83690e4171846f72b6872deaf487199ee9504/deskutils/py-paperless-ngx/files/paperless-ngx.7.in#L163) As a result, if the user follows the man page suggestion to download NLTK to `/var/db/paperless/nltkdata`, then the port won't be able to use NLTK, because of the different value of `NLTK_DIR` in their `/usr/local/etc/paperless.conf`.
patch-paperless.conf.example also adds incorrect variable names for the NLTK settings. It uses 'NLTK_DIR' and 'NLTK_ENABLED', while the correct values are 'PAPERLESS_NLTK_DIR' and 'PAPERLESS_ENABLE_NLTK'. I also have not seen any reference to 'NLTK_LANGUAGE' or the like in the documentation. https://docs.paperless-ngx.com/configuration/
Thanks for reporting, this is pretty weird (as it worked ok before, so I must have messed up a patch at some point). I'll look into it.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d716cbc8e98a9410782bbad8139f7b6457920e5b commit d716cbc8e98a9410782bbad8139f7b6457920e5b Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-04-24 12:39:17 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-04-24 21:56:50 +0000 deskutils/py-paperless-ngx: Fixes and improvements - Fix NLTK configuration in paperless.conf.sample - Mention snowball_data in NLTK instructions - Fix sad defect that prevented rc scripts from picking up configuration data from rc.conf - Improve startup script documentation - Document required ACL when using a remote redis instance - Document how to enable JBIG2 and its potential pitfalls PR: 278424, 278425, 278426 Reported by: anonymous bugzilla user, netchild MFH: 2024Q2 deskutils/py-paperless-ngx/Makefile | 1 + deskutils/py-paperless-ngx/files/paperless-beat.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-consumer.in | 8 +++++--- .../py-paperless-ngx/files/paperless-flower.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-migrate.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-ngx.7.in | 24 +++++++++++++++++++--- .../py-paperless-ngx/files/paperless-webui.in | 20 +++++++++++------- .../py-paperless-ngx/files/paperless-worker.in | 12 ++++++----- .../files/patch-paperless.conf.example | 10 ++++----- deskutils/py-paperless-ngx/files/pkg-message.in | 21 +++++++++++++++++++ 10 files changed, 93 insertions(+), 39 deletions(-)
A commit in branch 2024Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=27a97f780c56cf51b482aa828ad0e20e24f23fcc commit 27a97f780c56cf51b482aa828ad0e20e24f23fcc Author: Michael Gmelin <grembo@FreeBSD.org> AuthorDate: 2024-04-24 12:39:17 +0000 Commit: Michael Gmelin <grembo@FreeBSD.org> CommitDate: 2024-04-24 23:09:18 +0000 deskutils/py-paperless-ngx: Fixes and improvements - Fix NLTK configuration in paperless.conf.sample - Mention snowball_data in NLTK instructions - Fix sad defect that prevented rc scripts from picking up configuration data from rc.conf - Improve startup script documentation - Document required ACL when using a remote redis instance - Document how to enable JBIG2 and its potential pitfalls PR: 278424, 278425, 278426 Reported by: anonymous bugzilla user, netchild MFH: 2024Q2 (cherry picked from commit d716cbc8e98a9410782bbad8139f7b6457920e5b) deskutils/py-paperless-ngx/Makefile | 1 + deskutils/py-paperless-ngx/files/paperless-beat.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-consumer.in | 8 +++++--- .../py-paperless-ngx/files/paperless-flower.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-migrate.in | 12 ++++++----- .../py-paperless-ngx/files/paperless-ngx.7.in | 24 +++++++++++++++++++--- .../py-paperless-ngx/files/paperless-webui.in | 20 +++++++++++------- .../py-paperless-ngx/files/paperless-worker.in | 12 ++++++----- .../files/patch-paperless.conf.example | 10 ++++----- deskutils/py-paperless-ngx/files/pkg-message.in | 21 +++++++++++++++++++ 10 files changed, 93 insertions(+), 39 deletions(-)