From 7b4403c84ee18862bd4aed3e0d7cc54bc5d5001a Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Mon, 26 Dec 2022 16:19:46 +0100 Subject: [PATCH] paperless-venv - Step to install document classification model (nltk) --- seqs/paperless-venv.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/seqs/paperless-venv.sh b/seqs/paperless-venv.sh index 0deb66d..cd9bc85 100755 --- a/seqs/paperless-venv.sh +++ b/seqs/paperless-venv.sh @@ -189,6 +189,21 @@ step_17() { exe "${sc_paperlessVenv}/bin/python3" manage.py migrate } +step_19_info() { echo "Install document classification model (nltk)"; } +step_19_alias() { echo 'nltk'; } +step_19() { + info 'Installing nltk' + exe "${sc_paperlessVenv}/bin/pip3" install -U nltk + endReturn -o $? "Failed to install nlkt" + + exe cd "${sc_paperlessHome}/data" + exe mkdir -p "nltk" + exe "${sc_paperlessVenv}/bin/python3" -m nltk.downloader -d ./nltk/ snowball_data stopwords punkt + endReturn -o $? "Failed to install nlkt modules snowball stopwords punkt" + + step service restart +} + step_30_info() { echo "Retag existing documents" echoinfo "OPTIONS"