{"id":22081761,"url":"https://github.com/fieg/bayes","last_synced_at":"2025-07-24T14:32:58.729Z","repository":{"id":13462217,"uuid":"16151963","full_name":"fieg/bayes","owner":"fieg","description":"Implementation of Naive Bayes Classifier algorithm in PHP.","archived":false,"fork":false,"pushed_at":"2017-05-24T15:55:16.000Z","size":17,"stargazers_count":71,"open_issues_count":0,"forks_count":16,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-07-10T23:33:59.425Z","etag":null,"topics":["bayes","machine-learning","naive-bayes-classifier","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/fieg.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}},"created_at":"2014-01-22T20:41:55.000Z","updated_at":"2024-02-23T19:16:38.000Z","dependencies_parsed_at":"2022-07-30T15:08:01.846Z","dependency_job_id":null,"html_url":"https://github.com/fieg/bayes","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/fieg/bayes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fieg%2Fbayes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fieg%2Fbayes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fieg%2Fbayes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fieg%2Fbayes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fieg","download_url":"https://codeload.github.com/fieg/bayes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fieg%2Fbayes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266855945,"owners_count":23995587,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bayes","machine-learning","naive-bayes-classifier","php"],"created_at":"2024-11-30T23:25:18.922Z","updated_at":"2025-07-24T14:32:58.475Z","avatar_url":"https://github.com/fieg.png","language":"PHP","readme":"Naive Bayes Classifier\n======================\n\nImplementation of Naive Bayes Classifier algorithm in PHP.\n\nBased on [Machine Learning: Naive Bayes Document Classification Algorithm in Javascript](http://burakkanber.com/blog/machine-learning-naive-bayes-1/) by Burak Kanber.\n\n[![Build Status](https://travis-ci.org/fieg/bayes.png?branch=master)](https://travis-ci.org/fieg/bayes)\n\nGetting started\n---------------\n\n```php\nuse Fieg\\Bayes\\Classifier;\nuse Fieg\\Bayes\\Tokenizer\\WhitespaceAndPunctuationTokenizer;\n\n$tokenizer = new WhitespaceAndPunctuationTokenizer();\n$classifier = new Classifier($tokenizer);\n\n$classifier-\u003etrain('en', 'This is english');\n$classifier-\u003etrain('fr', 'Je suis Hollandais');\n\n$result = $classifier-\u003eclassify('This is a naive bayes classifier');\n```\n\nWhich would result in:\n\n```\narray(2) {\n  'en' =\u003e\n  double(0.9)\n  'fr' =\u003e\n  double(0.1)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffieg%2Fbayes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffieg%2Fbayes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffieg%2Fbayes/lists"}