1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
<h2>Spam Filtering: Bayes</h2>
<form class="mod" id="spamconfig" method="post">
<fieldset>
<legend>Configuration</legend>
<p>The bayesian filter requires training before it can effectively
differentiate between spam and ham. The training database currently
contains <strong><?cs var:admin.bayes.nspam ?> spam</strong> and
<strong><?cs var:admin.bayes.nham ?> ham</strong> submissions.</p>
<div class="field">
<label><input type="checkbox" id="reset" name="reset" <?cs
if:!admin.bayes.nham && !admin.bayes.nspam ?> disabled="disabled"<?cs /if ?> />
Clear training database
</label>
<p class="hint">
Resetting the training database can help when training was incorrect
and is producing bad results.
</p>
</div>
<div class="field">
<label>Minimum training required:
<input type="text" id="min_training" name="min_training" size="3"
value="<?cs var:admin.bayes.min_training ?>" />
</label>
<p class="hint">
The minimum number of spam and ham in the training database before
the filter starts affecting the karma of submissions.
</p>
</div>
<div class="buttons">
<input type="submit" value="Apply changes" />
</div>
</fieldset>
<fieldset>
<legend>Training</legend>
<p class="hint">
While you can train the spam filter from the “<em>Spam
Filtering → Monitoring</em>” panel in the web
administration interface, you can also manually train the filter by
entering samples here, or check what kind of spam probabilty
currently gets assigned to the content.
</p>
<div class="field">
<label for="content">Content:</label><br />
<textarea id="content" name="content" rows="10" cols="60">
<?cs var:admin.bayes.content ?></textarea>
</div>
<?cs if:admin.bayes.content ?>
<div class="field">
<?cs if:admin.bayes.error ?>
<strong>Error: <?cs var:admin.bayes.error ?></strong>
<?cs else ?>
<strong>Score: <?cs var:admin.bayes.score ?>%</strong>
<?cs /if ?>
</div>
<?cs /if ?>
<div class="buttons">
<input type="submit" name="test" value="Test" <?cs
if:!admin.bayes.nham || !admin.bayes.nspam ?> disabled="disabled"<?cs /if ?> />
<input type="submit" name="train" value="Train as Spam" />
<input type="submit" name="train" value="Train as Ham" />
</div>
</fieldset>
<script type="text/javascript">
enableControl("reset", <?cs if:admin.bayes.nspam || admin.bayes.nham ?>true<?cs else ?>false<?cs /if ?>);
</script>
</form>
|