{"id":13747682,"url":"https://github.com/cardmagic/classifier","last_synced_at":"2026-04-02T01:28:51.880Z","repository":{"id":396649,"uuid":"14702","full_name":"cardmagic/classifier","owner":"cardmagic","description":"A general classifier module to allow Bayesian and other types of classifications.","archived":false,"fork":false,"pushed_at":"2024-03-26T20:24:49.000Z","size":56,"stargazers_count":660,"open_issues_count":18,"forks_count":123,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-05-21T22:44:51.290Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rubyforge.org/projects/classifier/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cardmagic.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2008-05-05T17:24:11.000Z","updated_at":"2024-07-31T17:20:31.498Z","dependencies_parsed_at":"2024-05-12T14:02:59.544Z","dependency_job_id":null,"html_url":"https://github.com/cardmagic/classifier","commit_stats":{"total_commits":37,"total_committers":11,"mean_commits":"3.3636363636363638","dds":0.5675675675675675,"last_synced_commit":"519e2ed6560653fde0e90f2aed4fe9a5b97872bb"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardmagic%2Fclassifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardmagic%2Fclassifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardmagic%2Fclassifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cardmagic%2Fclassifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cardmagic","download_url":"https://codeload.github.com/cardmagic/classifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224849361,"owners_count":17380106,"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-08-03T06:01:37.712Z","updated_at":"2025-12-29T19:21:45.923Z","avatar_url":"https://github.com/cardmagic.png","language":"Ruby","readme":"## Welcome to Classifier\n\nClassifier is a general module to allow Bayesian and other types of classifications.\n\n## Download\n\n* https://github.com/cardmagic/classifier\n* gem install classifier\n* git clone https://github.com/cardmagic/classifier.git\n\n## Dependencies\n\nIf you install Classifier from source, you'll need to install Roman Shterenzon's fast-stemmer gem with RubyGems as follows:\n\n    gem install fast-stemmer\n\nIf you would like to speed up LSI classification by at least 10x, please install the following libraries:\nGNU GSL:: http://www.gnu.org/software/gsl\nrb-gsl:: https://github.com/SciRuby/rb-gsl\n\nNotice that LSI will work without these libraries, but as soon as they are installed, Classifier will make use of them. No configuration changes are needed, we like to keep things ridiculously easy for you.\n\n## Bayes\n\nA Bayesian classifier by Lucas Carlson. Bayesian Classifiers are accurate, fast, and have modest memory requirements.\n\n### Usage\n\n    require 'classifier'\n    b = Classifier::Bayes.new 'Interesting', 'Uninteresting'\n    b.train_interesting \"here are some good words. I hope you love them\"\n    b.train_uninteresting \"here are some bad words, I hate you\"\n    b.classify \"I hate bad words and you\" # returns 'Uninteresting'\n\n    require 'madeleine'\n    m = SnapshotMadeleine.new(\"bayes_data\") {\n        Classifier::Bayes.new 'Interesting', 'Uninteresting'\n    }\n    m.system.train_interesting \"here are some good words. I hope you love them\"\n    m.system.train_uninteresting \"here are some bad words, I hate you\"\n    m.take_snapshot\n    m.system.classify \"I love you\" # returns 'Interesting'\n\nUsing Madeleine, your application can persist the learned data over time.\n\n### Bayesian Classification\n\n* http://www.process.com/precisemail/bayesian_filtering.htm\n* http://en.wikipedia.org/wiki/Bayesian_filtering\n* http://www.paulgraham.com/spam.html\n\n## LSI\n\nA Latent Semantic Indexer by David Fayram. Latent Semantic Indexing engines\nare not as fast or as small as Bayesian classifiers, but are more flexible, providing\nfast search and clustering detection as well as semantic analysis of the text that\ntheoretically simulates human learning.\n\n### Usage\n\n    require 'classifier'\n    lsi = Classifier::LSI.new\n    strings = [ [\"This text deals with dogs. Dogs.\", :dog],\n              [\"This text involves dogs too. Dogs! \", :dog],\n              [\"This text revolves around cats. Cats.\", :cat],\n              [\"This text also involves cats. Cats!\", :cat],\n              [\"This text involves birds. Birds.\",:bird ]]\n    strings.each {|x| lsi.add_item x.first, x.last}\n\n    lsi.search(\"dog\", 3)\n    # returns =\u003e [\"This text deals with dogs. Dogs.\", \"This text involves dogs too. Dogs! \",\n    #             \"This text also involves cats. Cats!\"]\n\n    lsi.find_related(strings[2], 2)\n    # returns =\u003e [\"This text revolves around cats. Cats.\", \"This text also involves cats. Cats!\"]\n\n    lsi.classify \"This text is also about dogs!\"\n    # returns =\u003e :dog\n\n    lsi.classify_with_confidence \"This text is also about dogs!\"\n    # returns =\u003e [:dog, 1.0]\n\nPlease see the Classifier::LSI documentation for more information. It is possible to index, search and classify\nwith more than just simple strings.\n\n### Latent Semantic Indexing\n\n* http://www.c2.com/cgi/wiki?LatentSemanticIndexing\n* http://www.chadfowler.com/index.cgi/Computing/LatentSemanticIndexing.rdoc\n* http://en.wikipedia.org/wiki/Latent_semantic_analysis\n\n## Authors\n\n* Lucas Carlson  (lucas@rufy.com)\n* David Fayram II (dfayram@gmail.com)\n* Cameron McBride (cameron.mcbride@gmail.com)\n* Ivan Acosta-Rubio (ivan@softwarecriollo.com)\n\nThis library is released under the terms of the GNU LGPL. See LICENSE for more details.\n\n","funding_links":[],"categories":["Ruby","Scientific","[](https://github.com/josephmisiti/awesome-machine-learning/blob/master/README.md#ruby)Ruby"],"sub_categories":["General-Purpose Machine Learning"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcardmagic%2Fclassifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcardmagic%2Fclassifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcardmagic%2Fclassifier/lists"}