我正在创建一个网站,用户可以在其中撰写文章和评论文章。我想自动检查新文章或评论是否是垃圾邮件。
这样做有什么好的库?
我查看了贝叶斯分类器库,但似乎我必须收集大量样本并将它们全部归类为垃圾邮件或非垃圾邮件...
我正在寻找可以直接告诉我开箱即用的东西。
更新:也许如果这样的事情不存在,有没有人知道下载了大量的垃圾邮件分类而非垃圾邮件可以送入贝叶斯分类器?
答案 0 :(得分:0)
答案 1 :(得分:0)
在CodePlex上查看Akismet .NET 2.0 Api。
以下是CodePlex页面的示例:
// Verify key
Akismet api = new Akismet("key", "http://url.com", "Test/1.0");
if (!api.VerifyKey()) throw new Exception("Key could not be verified.");
// Create comment object for testing
AkismetComment comment = new AkismetComment();
comment.Blog = "http://joel.net";
comment.UserIp = "147.202.45.202";
comment.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)";
comment.CommentContent = "<a href=\"http://someone.finderinn.com\">find someone</a>";
comment.CommentType = "comment";
comment.CommentAuthor = "someone";
comment.CommentAuthorEmail = "backthismailtojerry@fastmail.fm";
comment.CommentAuthorUrl = "http://someone.finderrin.com";
// Test comment against akismet's service
bool isSpam = api.COmmentCheck(comment);
Akismet岩石。
- 查尔斯