ArticleslgStudy

computer science

Wordfilter

Wordfilter is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Wordfilter rather than just read about it. In short: A wordfilter (sometimes referred to as just "filter" or "censor") is a script typically used on Internet forums or chat rooms that automatically scans users' posts or comments as they are submitted and automatically changes or censors particular words or phrases. The most basic wordfilters search only for specific strings of letters, and remove or overwrite them regardless of their context.

Wordfilter — main illustration
Wordfilter — illustration

Key takeaways

  • Wordfilter belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Wordfilter to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Wordfilter from memory before moving on to harder problems.

Reference excerpt

A wordfilter (sometimes referred to as just "filter" or "censor") is a script typically used on Internet forums or chat rooms that automatically scans users' posts or comments as they are submitted and automatically changes or censors particular words or phrases. The most basic wordfilters search only for specific strings of letters, and remove or overwrite them regardless of their context. More advanced wordfilters make some exceptions for context (such as filtering "butt" but not "butter"), and more advanced wordfilters may use regular expressions.

Functions Wordfilters can serve any of a number of functions.

Removal of vulgar language A swear filter, also known as a profanity filter, obscenity filter or language filter is a software subsystem which modifies text to remove words deemed offensive by the administrator or community of an online forum. Swear filters are common in custom-programmed chat rooms and online video games, primarily MMORPGs. This is not to be confused with content filtering, which is usually built into internet browsing programs by third-party developers to filter or block specific websites or types of websites. Swear filters are usually created or implemented by the developers of the Internet service. Most commonly, wordfilters are used to censor language considered inappropriate by the operators of the forum or chat room. Expletives are typically partially replaced, completely replaced, or replaced by nonsense words. This relieves the administrators or moderators of the task of constantly patrolling the board to watch for such language. This may also help the message board avoid content-control software installed on users' computers or networks, since such software often blocks access to Web pages that contain vulgar language. Filtered phrases may be permanently replaced as it is saved (example: phpBB 1.x), or the original phrase may be saved but displayed as the censored text. In some software users can view the text behind the wordfilter by quoting the post. Swear filters typically take advantage of string replacement functions built into the programming language used to create the program, to swap out a list of inappropriate words and phrases with a variety of alternatives. Alternatives can include:

Grawlix nonsense characters, such as !@#$%^&* Replacing a certain letter with a shift-number character or a similar looking one. Asterisks, number signs, or black squares (*, # or █) of either a set length, or the length of the original word being filtered. Alternatively, posters often replace certain letters with an asterisk. Phonetic euphemisms, known as minced oaths such as "heck", "frick", or "darn" Family friendly words or phrases, or euphemisms, like "LOVE" or "I LOVE YOU", or completely different words which have nothing to do with the original word. Deletion of the post. In this case, the entire post is blocked and there is usually no way to fix it. Nothing at all, but whitespaces. In this case, the offending word is replaced with whitespaces of the length of the word being filtered. Some swear filters do a simple search for a string. Others have measures that ignore whitespace, and still others go as far as ignoring all non-alphanumeric characters and then filtering the plain text. This means that if the word "you" was set to be filtered, "y o u" or "y.o!u" would also be filtered.

Cliché control Clichés—particular words or phrases constantly reused in posts, also known as "memes"—often develop on forums. Some users find that these clichés add to the fun, but other users find them tedious, especially when overused. Administrators may configure the wordfilter to replace the annoying cliché with a more embarrassing phrase, or remove it altogether.

Vandalism control Internet forums are sometimes attacked by vandals who try to fill the forum with repeated nonsense messages, or by spammers who try to insert links to their commercial web sites. The site's wordfilter may be configured to remove the nonsense text used by the vandals, or to remove all links to particular websites from posts.

Lameness filter Lameness filters are text-based wordfilters used by Slash-based websites (such as textboards and imageboards) to stop junk comments from being posted in response to stories. Some of the things they are designed to filter include:

Too many capital letters Too much repetition ASCII art Comments which are too short or long Use of HTML tags that try to break web pages Comment titles consisting solely of "first post" Any occurrence of a word or term deemed (by the programmers) to be offensive/vulgar

Government censorship The Chinese government censors some internet content, which is reflected in the chat feature of some online games. In 2017, a paper looked at over 180,000 unique blacklisted keywords in mobile games. Content policy plans are required to be submitted to regulators, but there is no centralized 'banned' keyword list provided by federal or even provincial authorities, so every developer and publisher may or may not allow different "edge cases". The flagging of innocuous language because of regex-based keyword lists is omnipresent whether in Latin or Chinese characters. This has prompted a Chinese internet slang culture that leans heavily on puns and intentional misspelling, such as the Baidu 10 Mythical Creatures.

Circumventing filters

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Wordfilter

Start with the simplest possible case. Write down what Wordfilter claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Wordfilter before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Wordfilter ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Wordfilter

In research
Wordfilter appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Wordfilter in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Wordfilter is common in secondary-school and first-year university syllabi. It links to neighbouring topics Content-control software, Internet forum terminology, Prudishness, so understanding it makes those chapters shorter.
In everyday life
Look for Wordfilter outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Wordfilter” →

How to study Wordfilter in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Wordfilter means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Wordfilter out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Wordfilter in simple terms?

A wordfilter (sometimes referred to as just "filter" or "censor") is a script typically used on Internet forums or chat rooms that automatically scans users' posts or comments as they are submitted and automatically changes or censors particular words or phrases. The most basic wordfilters search o…

Why does Wordfilter matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Wordfilter?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Wordfilter.

Tags

  • Content-control software
  • Internet forum terminology
  • Prudishness

Keep exploring