deleted container.py and fix detector

This commit is contained in:
SlimusMinus
2026-09-07 00:13:55 +03:00
parent 327394a22a
commit 3ab97895af
2 changed files with 1 additions and 15 deletions

View File

@@ -1,14 +0,0 @@
from app.moderation.profanity.detector import ProfanityDetector
from app.moderation.profanity.dictionary import ProfanityDictionary
from app.moderation.profanity.lemmatizer import Lemmatizer
dictionary = ProfanityDictionary(
"app/resources/profanity_words.txt"
)
lemmatizer = Lemmatizer()
profanity_detector = ProfanityDetector(
dictionary,
lemmatizer
)

View File

@@ -33,7 +33,7 @@ class ProfanityDetector:
for bad_word in self.dictionary.words: for bad_word in self.dictionary.words:
if lemma.startswith(bad_word): if lemma == bad_word or lemma.startswith(bad_word + "-"):
result.append(word) result.append(word)