MongoDB Support for Judgr

September 24, 2012 · View on GitHub

This project adds MongoDB support for Judgr, a naïve Bayes classifier library written in Clojure.

Getting Started

Add the following dependencies to your project.clj file:


[judgr/mongodb "0.1.3"]

Then, require the judgr.mongo.db module and adjust the settings in order to create your classifier:


(ns your-ns
  (:use [judgr.core]
        [judgr.settings]
        [judgr.mongo.db]))

(def new-settings
  (update-settings settings
                   [:database :type] :mongo
                   [:database :mongo] {:database "your-db"
                                       :host     "localhost"
                                       :port     27017
                                       :auth?    false
                                       :username ""
                                       :password ""}))

(def classifier (classifier-from new-settings))

Doing this, all data will be stored in the specified MongoDB instance.

License

Copyright (C) Daniel Fernandes Martins

Distributed under the New BSD License. See COPYING for further details.