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"