paperless-venv - Step to install document classification model (nltk)

This commit is contained in:
2022-12-26 16:19:46 +01:00
parent 95501fcf10
commit 7b4403c84e

View File

@@ -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"