Allows disabling NLTK, adds it as a consideration for low power devices

This commit is contained in:
Trenton H
2022-09-23 07:32:17 -07:00
parent a78d44ec5f
commit 2d71415ede
3 changed files with 9 additions and 1 deletions

View File

@@ -312,7 +312,7 @@ class DocumentClassifier:
content = re.sub(r"[^\w\s]", " ", content)
# If the NLTK language is supported, do further processing
if settings.NLTK_LANGUAGE is not None:
if settings.NLTK_LANGUAGE is not None and settings.NLTK_ENABLED:
import nltk