{"id":23072522,"url":"https://github.com/doches/classifier-service","last_synced_at":"2025-04-03T10:43:46.183Z","repository":{"id":66510553,"uuid":"72194542","full_name":"doches/classifier-service","owner":"doches","description":"Naive Bayes classification as a microservice.","archived":false,"fork":false,"pushed_at":"2016-10-29T08:36:31.000Z","size":120,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T00:17:49.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doches.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-28T09:36:43.000Z","updated_at":"2018-12-24T14:56:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc67ded8-1511-4ec8-a0c0-1e18b5c9ccb6","html_url":"https://github.com/doches/classifier-service","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doches%2Fclassifier-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doches%2Fclassifier-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doches%2Fclassifier-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doches%2Fclassifier-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doches","download_url":"https://codeload.github.com/doches/classifier-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989505,"owners_count":20865305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T07:20:02.665Z","updated_at":"2025-04-03T10:43:46.156Z","avatar_url":"https://github.com/doches.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Classifier Service\n\nThis is a tiny standalone microservice that provides naive Bayes classification through a simple API.\n\n## Api\n\n### Learning\n\n`POST` a JSON object containing a training `example` and a `category` to apply to `/api/classifier/learn`:\n\n    curl -XPOST http://localhost:6000/api/classifier/learn -d '{\"example\": \"sunshine and roses\", \"category\": \"positive\"}' -H \"Content-Type: application/json\"\n    curl -XPOST http://localhost:6000/api/classifier/learn -d '{\"example\": \"fire and brimstone\", \"category\": \"negative\"}' -H \"Content-Type: application/json\"\n    \n### Classifying\n\n    curl -XPOST http://localhost:GET http://localhost:6000/api/classifier/classify?q=fire\n    \u003e negative\n    \n    curl -XPOST http://localhost:GET http://localhost:6000/api/classifier/classify?q=roses\n    \u003e positive\n    \nYou can append an optional threshold parameter (`t`) to the url; if this is present, `/classify` will only return the best\nmatching category if the probability of that category exceeds `t`:\n\n    curl -XGET \"http://localhost:6000/api/classifier/classify?q=unicorns\\\u0026t=0.5\"\n    \u003e \n\n## Dependencies\n\nThe only external dependency is Java 8. \n\n## Deploying\n\n1. Build a distributable zip with `./gradlew distZip`.\n2. Schlep this file over to your servers.\n3. Unzip.\n4. Start the server with `./bin/distribution server var/conf/server.yml`\n\n## Development\n\n1. Run `./gradlew idea` to generate an IntelliJ project.\n2. Import the gradle project as well, for easily-refreshed dependencies.\n3. Edit the generated run configuration, changing the module classpath to `classifier-service-server_main`. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoches%2Fclassifier-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoches%2Fclassifier-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoches%2Fclassifier-service/lists"}