Задать вопрос

Тел: +7 965 3737 888

474

Просмотров

0

Ответов

Profanity Function (Disemvowel)

A better way of dealing w/profanity - disemvowel it!

From Wikipedia, "disemvoweling is a technique used to censor unwanted postings such as spam, internet trolling, rudeness or criticism and yet maintain some transparency, both of the act and the underlying word." Credit: Boing Boing

Example:

This original sentence: In the fields of Internet discussion and forum moderation, disemvoweling (also spelled disemvowelling) is the removal of vowels from text. would be disemvowelled to look like this: n th flds f ntrnt dscssn nd frm mdrtn, dsmvwlng (ls splld dsmvwllng) s th rmvl f vwls frm txt.

Usage:

body_input = form.cleaned_data["body"]

body_input = disemvowel_profanity(body_input)

Вопрос полезен? Да0/Нет0
file_5154.py(247.0б)
None