Compare lower case

merge-requests/25/head
Bob Mottram 2022-07-05 19:47:23 +01:00
parent 8806572402
commit a5e1d549f3
2 changed files with 9 additions and 2 deletions

View File

@ -1023,7 +1023,7 @@ def _get_simplified_content(content: str) -> str:
def detect_dogwhistles(content: str, dogwhistles: {}) -> {}:
"""Returns a dict containing any detected dogwhistle words
"""
content = remove_html(content)
content = remove_html(content).lower()
result = {}
words = _get_simplified_content(content).split(' ')
for whistle, category in dogwhistles.items():
@ -1031,8 +1031,9 @@ def detect_dogwhistles(content: str, dogwhistles: {}) -> {}:
continue
ending = False
starting = False
whistle = whistle.lower()
if whistle.lower().startswith('x-'):
if whistle.startswith('x-'):
whistle = whistle[2:]
ending = True
elif (whistle.startswith('*') or

View File

@ -1,9 +1,15 @@
X-pilled, alt-right terminology
soy boy, alt-right terminology
soyboy, alt-right terminology
soyboi, alt-right terminology
kek, alt-right terminology
groyper, alt-right meme
chad, alt-right meme
globalist*, antisemitism
globalism, antisemitism
fren, alt-right terminology
cuck*, alt-right terminology
*1488, nazism
nazbol, nazism
*1290, antisemitism