Abuse Bayes Server
The Abuse Bayes server is a simple
express app that classifies strings sent to it.
To get started, clone the source:
git clone firstname.lastname@example.org:simonv3/abuse-bayes-server.git
Move to the newly created directory:
Install the necessary packages
And then run the server:
You can access the api in your browser at
localhost:3000/api/v1/classify/, which will tell you to POST to a string to it to get a result. Use a plug in like REST Easy to test with a POST request.
Training Your Server
You need an abuse text corpus and a normal text corpus. Then
node trainer/trainer.js <ABUSE.TXT> <NORMAL.TXT>
This will use the redis backend to train your server.
If you're on a mac - use homebrew!
brew install redis. Else, I don't know!
It will give you instructions on how to get it running on launch.
- Make classify accept multiple text strings to limit amount of queries
- Create a train endpoint
- Make a "not sure" page
- Split up app into not just one page cause common
- We'll probably need to rate limit.