Send an article headline found on the Internet and THE PERCEPTICON will tell you if it's good or bad journalism!
The API is live here - it's an API only Rails project so there's now views. See the front-end demo for instructions on how to use it.
Check out the Frontend demo for a demonstration
This was created as part of the final project at Makers Academy. It is a sample implementation of a (pre-taught) Perceptron algorithm that's accessible using a HTTP GET request.
Other components of the final project:
Tech used in this project:
- Rails
- PostgreSQL
- Heroku
- TravisCI
- Clone this repo by running
git clone git@github.com:tbscanlon/percepticon.git
- Install dependencies by running
bundle install
(you may need togem install bundle
) - Set up the databases:
bin/rake db:migrate
- Launch the server by running
bin/rails s
- Send a GET request to the following route, with a query string similar to the example:
http://localhost:3000/scores/new?title="22 Weird Pictures of Kim Kardashian that Broke the Internet"
You'll get a response back with the following JSON object:
"created_at": "2017-08-24T16:59:53.118Z",
"expected": null,
"id": 26,
"result": 1,
"updated_at": "2017-08-24T16:59:53.144Z",
"vector": [
"1",
"1",
"1",
"1",
"0",
"0"]
}
A result greater than 0
indicates a bad article title.
- Launch the server by running
bin/rails s
- Send a GET request to the following route, with a query string similar to the example:
http://localhost:3000/scores/new?title="Businesses Uncertain over Brexit"
You'll get a response back with the following JSON object:
"created_at": "2017-08-24T16:59:53.118Z",
"expected": null,
"id": 26,
"result": 0,
"updated_at": "2017-08-24T16:59:53.144Z",
"vector": [
"1",
"0",
"0",
"0",
"0",
"0"]
}
A result equal to 0
indicates a good article title.
Created by Team Vectorspace: