Introduction
This file, ui.html
, defines the look-and-feel
of the user interface of the SpamBayes Server. The various
pieces of HTML defined here are extracted and manipulated at
runtime to dynamically produce the HTML that the SpamBayes
Server serves up - this file acts as a palette of HTML
components. PyMeldLite
is the module that provides
the HTML-to-object mapping layer that makes all this possible.
Each piece of HTML that needs to be manipulated has an
id
tag, and becomes a Python object at runtime.
This "Introduction" section serves as an introduction to this file. It does not require translation and is never used in the run-time interface.
As an example of how this works, here is an editbox with
an id
of examplebox
:
PyMeldLite lets you manipulate the HTML programmatically:
>>> import PyMeldLite >>> html = open("ui.html", "rt").read() >>> doc = PyMeldLite.Container(html) >>> print doc.examplebox <input id="examplebox" size="10" type="text" value="example"/> >>> doc.examplebox.value = "Changed" >>> print doc.examplebox <input id="examplebox" size="10" type="text" value="Changed"/>
So the Python code to build the HTML user interface pages doesn't need to faff about pasting strings together, or building HTML components from scratch in code. And the look-and-feel is controlled solely by this one HTML file - changing the stylesheet, translating into other languages, adding a new piece of user interface - all of these things are very easy.
Below are all the user interface components along with their
id
s.
headedBox
Headed box | |
![]() |
This is a "headedBox". Most of the user interfaces pieces are
presented in one of these. The pieces aren't presented in these
boxes here in ui.html to avoid duplication of HTML.
As such, this section does not need translation.
|
The help page
SpamBayes Help | |
![]() |
Sorry, there isn't any specific help available for that section. |
If you believe you may have found a bug in SpamBayes, or are
at a loss as to how you can proceed, you can ask the SpamBayes
mailing list for assistance. Note that the members of this list
are volunteers that answer questions in their free time, so an
answer to your question might take a little while to appear. If
you are quite certain that you have found a bug, then you're
probably better off submitting this via the
SourceForge tracking system, as sometimes things get lost on
the list, particularly in busy times or when the latest virus is
flooding the net with bogus messages. There is certain information which people need to know in order to suggest how you might fix any problems. To help make sure that you have all this information, SpamBayes can create a help message for you. If you choose to email the list without using this, please ensure that you have all the pertinent information. (Otherwise your response is likely to be "please tell us ..."). |
Context-sensitive help page text
Review Page Help
When you first start using SpamBayes, all your mail will be classified as 'unsure' because SpamBayes doesn't have any preconceived ideas about what good or bad mail looks like. As soon as you start training the classification will improve, and by the time you've classified even 20 messages of each you'll be seeing quite reasonable results.
SpamBayes saves a temporary copy of all incoming mail so that classification can be independant of whatever mail client you are using. You need to run through these messages and tell SpamBayes how to handle mail like that in the future. This page lists messages that have arrived in the last %(cache_expiry_days)s days and that have not yet been trained. For each message listed, you need to choose to either discard (don't train on this message), defer (leave training on this message until later), or train (as either good - ham, or bad - spam). You do this by simply clicking in the circle in the appropriate column; if you wish to change all the messages to the same action, you can simply click the column heading.
You are presented with the subject and sender of each message, but, if this isn't enough information for you to make a decision on the message, you can also view the message text (this is the raw text, so you can't do any damage if the message contains a virus or any other malignant data). To do this, simply click on the subject of the message.
Once you have chosen the actions you wish to perform on all the displayed messages, click the Train button at the end of the page. SpamBayes will then update its database to reflect this data.
Note that the messages are split up into the classification that SpamBayes would place the message with current training data (if this is correct, you might choose to Discard the message, rather than train on it - see the SpamBayes wiki for discussion of training techniques). You can also see the Tokens that the message contains (the words in the message, plus some additional tokens that SpamBayes generates) and the Clues that SpamBayes used in classifying the message (not all tokens are used in classification).
So that the page isn't overwhelmingly long, messages waiting for review are split by the day they arrived. You can use the Previous Day or Next Day buttons at the top of the page to move between days. If mail arrives while the review page is open the new messages will not be automatically added to the displayed list; to add the new message, click the Refresh button at the top of the page.
Statistics Page Help
SpamBayes keeps track of certain information about the messages that are classified. For your interest, this page displays statistics about the messages that have been classified and trained so far.
Currently the page displays information about the number of messages that have been classified as good, bad and unsure, how many of these were false negatives or positives, and how many messages were classified as unsure (and what their correct classification was).
Note that the data for this page resides in the "message info" database that SpamBayes uses, and so only reflects messages since the last time this database was created.
Home Page Help
This is the main page for the SpamBayes web interface. You are presented with some information about the current status of SpamBayes, and can follow links to review messages or alter your configuration.
If you have messages stored in a mbox or dbx (Outlook Express) file that you wish to 'bulk' train, or if you wish to train on a message that you type in, you can do this on this page. Click the "Browse" button (or paste the text in, including headers), and then click the Train as Ham or Train as Spam button.
Likewise, if you have a message that you wish to classify, you can do this. Either paste the message into the text box, or click "Browse" and locate the text file that the message is located in. Click Classify, and you will be taken to a page describing the classification of that message.
If you want to find out information about a word in the statistics database that forms the heart of SpamBayes, you can use the "Word Query" facility. Enter in the word that you wish to search for and click Tell me about this word. If you enable the advanced find query, you can also search using wildcards or regular expressions.
You can also search for a specific message in the cache of temporary copies of messages that have been proxied. You might wish to do this if you realise that you have incorrectly trained a message and need to correct the training. You can search the subject, headers, or message body, or for the SpamBayes ID (which is in the headers of messages that SpamBayes proxies). Messages that are found will be presented in the standard review page. Note that once messages expire from the cache (after %(cache_expiry_days)s days), you can no longer find them.
A pre-filled-in 'help' message
status
POP3 proxy running on 1110,
proxying to example.com.
Active POP3 conversations: 0. POP3 conversations this session: 0. Emails classified this session: 0 spam, 0 ham, 0 unsure. Total emails trained: Spam: 0 Ham: 0 More statistics... |
![]() system using the Configuration page. |
|
Warning: please insert warning message here! The warnings are all dynamically inserted, and so translating this text is not necessary. |
reviewText
The SpamBayes proxy stores all the messages it sees. You can train the classifier based on those messages using the Review messages page.
reviewTable
These are emails that you can use to train the classifier. Check the appropriate button for each email, then click 'Train' below. 'Defer' leaves the message here, to be trained on later. Click one of the Discard / Defer / Ham / Spam headers to check all of the buttons in that section in one go. Click one of the other headers to sort messages (within their classification) by that header (note that sorting will lose any changes you have made to the page).
upload
(The upload form gets used for both training and classifying - the inappropriate pieces are removed at runtime.)
wordQuery
findMessage
wordStats
Number of spam messages: 123.Number of ham messages: 456.
Probability that a message containing this word is spam: 0.789.
Word | # Spam | # Ham | Probability |
spambayes | 123 | 436 | .789 |
classifyResults
Spam probability: 0.123. Original probability: 0.125.
(The table of clues goes here, like this but in a headedBox):Word | Probability | Times in ham | Times in spam |
Example word | 0.123 | 1 | 2 |
Return Home or classify another:
(The Classify form goes here)configForm
shutdownMessage
Shutdown. Goodbye.