- Mysql connection tool connect database via JDBC in Anti-Spa/lib
- jcseg segments Chinese words
- Tomcat on which this system runs
-
Bayes Method in Spam Detection : In this formula , S = "a spam", w = "a specific word showing in the mail" , N = "a normal email".
-
An email certainly contains more than one word :
- I'm using this formula to detect emails in the program.
Here are more details of spam filtering ,fundamental knowledge of Combining Probability and Bayes theorem.
-
You need firstly include all the libs above to compile this program.Yet if you only uses in Tomcat, mysql connection tool and jcseg are already included in
/Anti-Spam/WEB-INF/lib
path on Tomcat. -
webapps
files of Tomcat are in '/webapps',copy '/webapps/Anti-Spam' folder to$TomcatPath/webapps/
of your Tomcat Installation Path.(attention,/webapps
may not be the latest version) -
Before you use it,create a file named 'sqlInfo.ini'(file name defined in
org.bit.util.GlobalConstants.java
),in which all init infomation is defined.Here are some necessary items.url = jdbc:mysql://localhost:3306/test user = langley password = 123456 jcsegPropPath = /Anti-Spam/WEB-INF/lib/jcseg.properties #or use absolute path
-
Run in Tomcat.