₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,329,684 members, 8,441,776 topics. Date: Thursday, 09 July 2026 at 06:39 AM

Toggle theme

Simple Banned Word Algorithm. - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingSimple Banned Word Algorithm. (1276 Views)

1 Reply (Go Down)

Simple Banned Word Algorithm. by kambo(op): 3:36am On Jun 18, 2013
THE Algorithm for capturing banned words for NL is so easy to bypass.
this is just a simple algorithm that can catch certain cases.
An all case scenario filter would i think be very complex.

catches cases like ban word , punctuated with non alphabetic characters.
e.g
if banned word = ban,banned,banner.
and user puts ba.n, ban.ned, etc
.
algorithm:
------------
one- .
split sentence into words.
-
- remove non alphabetic characters from words.
- check word against banned word database,
- if match, substitute banned word with NL version.

e.g ba.n -> ban (after removing non alphabetic characters -> check against NL db . match found found -.
replace.

fu....ck, b.rea.st, etc... all in the net now.
Re: Simple Banned Word Algorithm. by sarutobi: 10:08am On Jun 18, 2013
oga catch this ones:

breeast
fucck
boobi
pusi
pussyy

etc.

truth is, no matter how smart these bots are, humans will get smarter. Afterall they were designed by humans.

Nice post though.
Re: Simple Banned Word Algorithm. by Nobody: 3:25pm On Jun 18, 2013
sarutobi: oga catch this ones:

breeast
fucck
boobi
pusi
pussyy

etc.

truth is, no matter how smart these bots are, humans will get smarter. Afterall they were designed by humans.

Nice post though.
This would need a complex regex
Re: Simple Banned Word Algorithm. by Nobody: 6:47am On Jun 19, 2013
sarutobi: oga catch this ones:

breeast
fucck
boobi
pusi
pussyy

etc.

truth is, no matter how smart these bots are, humans will get smarter. Afterall they were designed by humans.

Nice post though.
U b baaad guy grin
I thnk dis will need a whole english dico to be put in the database, every word u typed is checked against d database, if not found, it is substituted with d nearest one and chcked against d banned words, if it matches d banned word, then an action is taken!
Re: Simple Banned Word Algorithm. by WhiZTiM(m): 8:16am On Jun 21, 2013
hahaha @sarutobi... funny examples...

Though, the best way to build up algorithms to take care of cases like that is to use: Nearest Neighbor heuristics; and high collision probability LSH L(ocality-sensitive hashing)....

Well, banned words system is either a lazy or a simple forum filtering system . . . for a revenue generating website like NL...
How about banned words + phrases....?? Grammar and linguistic systems. . . start implementing primitive systems as such.... its hard but good for commercial stuff....

Seun has a lot of big data of comments on NL, we could build such Probabilistic filtering systems.... And make it learn the kind of grammar it should ban... from a set of comments with insults....
1 Reply

Your Toughest AlgorithmLudo Game Algorithm Wanted For AI ProjectAlgorithm For Solving Systems Of Linear Equations234

Developing An Idea Into An ApplicationSelf Taught Engineer Talks About Her Career !!!Fastest Website Design & Software Development In Nigeria At An Affordable Price