https://github.com/simonv3/abuse-bayes-server
A server which tells you whether something is abuse or not using bayesian filtering
https://github.com/simonv3/abuse-bayes-server
Last synced: 2 months ago
JSON representation
A server which tells you whether something is abuse or not using bayesian filtering
- Host: GitHub
- URL: https://github.com/simonv3/abuse-bayes-server
- Owner: simonv3
- Created: 2015-11-03T21:25:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-10T23:35:54.000Z (over 10 years ago)
- Last Synced: 2025-01-11T16:58:02.086Z (over 1 year ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Abuse Bayes Server
The Abuse Bayes server is a simple [`express`](http://expressjs.com/) app that classifies strings sent to it.
It needs [redis](http://redis.io/) and [node](nodejs.org) to run.
## Getting Started
To get started, clone the source:
```
git clone git@github.com:simonv3/abuse-bayes-server.git
```
Move to the newly created directory:
```
cd abuse-bayes-server
```
Install the necessary packages
```
npm install
```
And then run the server:
```
node app.js
```
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](https://addons.mozilla.org/en-US/firefox/addon/rest-easy/?src=search) 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
```
This will use the redis backend to train your server.
### Installing Redis
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.
## Future
* [ ] 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.