A badword filter which can filter the given set of words from a string. Works with anything, Swing,Servlet, JSP etc. Use it in your programs such as chat applets to filter unwanted words in communication.
1. What is parser?
A badword filter which can filter the given set of words from a string. Works with anything, Swing,Servlet, JSP etc.
What are it's application?
For me its application is really nothing. For you there may be a world of things you can do with it You can use this code in your chat programs to filter those words which must be restricted in chat. You can use it in a mail servlet to filter unwanted words in your mail.
There are many more things you can do with it, if can think more than this.
2. How to use?
i. To use it just make a .class file with a list of badwords and pass it to the default constructor of
Parser
String badWords[]={
"shit","fuck","cunt","assole","sucks"
}
Eg : Parser myParserObject = new Parser(badWords);
ii. Now pass your string which contains the messege.
String mess= "world sucks";
String newMess= myParser.checkBadOnes(mess);
ii. Now the filtered message is in newMess, use it as per your requirement.
3. Features
Advanced pattern matching, yes it not only matches words but also matches Pattern so you use less badwords and best performance.
Eg. If you have given a badword as suck, and someone likes to flaw by words :
sucker
Sucked
Suckeeeeeeeeeeeeeeeeeeeer
Thissucker
All of the above words will be filtered automatically by a single word.
4. Its Free!!
You will never have to pay for this code but do tell me where you are using this code so I may add more pssibilities in my thoughts too.
Have Nice Coding.
Regards
Naveen Alok
File List:
@PSC_ReadMe_4878_2.txt
1Kb
parser/
0b
parser/GUIParser.class
2Kb
parser/GUIParser.java
2Kb
parser/Parser.class
1Kb
parser/Parser.java
2Kb
parser/ReadMe.txt
2Kb
parser/ReplaceSubstring.class
1Kb
parser/ReplaceSubstring.java
1Kb
parser/ServletParser.class
2Kb
parser/ServletParser.java
1Kb
parser/gpl.txt
18Kb
Similar code
Format Phone Number
(Popularity: ) : Enter a phone number, including the area code, and watch the script format the phone number on the fly as follows: (###)###-#### I did not write this code. I merely took it from another site and submitted it here for ... Student Roster
(Popularity: ) : This is a sample Java application that allows a user to update a STUDENT ROSTER, using a vector of student objects. AlphaSort
(Popularity: ) : Program Name: AlphaSort These program uses the "Bubble Sort Algorithm" to sort an array of strings in alphabetical order. The "Bubble Sort Algorithm" is not the "quickest algorithm" that can be use to sort a list of elements but it's ... Encrypto
(Popularity: ) : Encryption program encrypts a string of text. It can also decrypt strings of text which have been encrypted with this program. Translater
(Popularity: ) : Translate text into 1337, Ebonics, and 10 year old speak. You can also translate 1337 into English and make the text rAnDOmlY CaPITalIzeD Word Generator
(Popularity: ) : Generates new words randomly. You can change the number of syllables and words generated, enable leading or trailing vowels etc. Fully commented code. Demonstrates random numbers, string concatenation, nested loops, arrays. Cut contents of a page only by highLight it
(Popularity: ) : You high light a text or a picture on a page and press the button and the text you marked will disappear you can highLight a text too and press the button and write whatever you want insted of it