Commit c074aab9 authored by ale's avatar ale
Browse files

Markdown fixes

parent e488a120
...@@ -21,46 +21,44 @@ nospam.plugin_base.BasePlugin. ...@@ -21,46 +21,44 @@ nospam.plugin_base.BasePlugin.
API Description # API Description
---------------
The XML-RPC API is designed to be a functional subset of the one The XML-RPC API is designed to be a functional subset of the one
offered by blogspam.net. Two methods are available: offered by blogspam.net. Two methods are available:
* string testComment(struct data) * string testComment(struct data)
The 'data' parameter can have the following attributes: The *data* parameter can have the following attributes:
'comment': the text of the comment (utf-8 encoded, MANDATORY) * *comment*: the text of the comment (utf-8 encoded, MANDATORY)
'site': the URL of your website (unused for now) * *site*: the URL of your website (unused for now)
'agent': the User-Agent supplied by the user, if any * *agent*: the User-Agent supplied by the user, if any
'email': the email address supplied by the user, if any * *email*: the email address supplied by the user, if any
'link': the homepage link supplied by the user, if any * *link*: the homepage link supplied by the user, if any
'name': the name supplied by the user, if any * *name*: the name supplied by the user, if any
Any other attributes will be ignored. The return value will be a Any other attributes will be ignored. The return value will be a
string, formatted as following: string, formatted as following:
OK - comment is not spam * `OK` - comment is not spam
SPAM:[msg] - comment is spam, msg will have details * `SPAM:[msg]` - comment is spam, msg will have details
ERROR:[msg] - an error occurred while processing the comment * `ERROR:[msg]` - an error occurred while processing the comment
* string classifyComment(struct data) * string classifyComment(struct data)
The 'data' parameter only has two mandatory attributes: The *data* parameter only has two mandatory attributes:
'comment': the text of the comment (utf-8 encoded) * *comment*: the text of the comment (utf-8 encoded)
'train': desired classification, either 'ok' or 'spam' * *train*: desired classification, either *ok* or *spam*
The return value is a string, formatted as following: The return value is a string, formatted as following:
OK - classification was successful * `OK` - classification was successful
ERROR:[msg] - an error occurred * `ERROR:[msg]` - an error occurred
Training and testing # Training and testing
--------------------
The scripts in the train/ directory allow for training and testing the The scripts in the train/ directory allow for training and testing the
service using pre-existing data. It is expected that this data will be service using pre-existing data. It is expected that this data will be
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment