amumu / reverend Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://bazaar.launchpad.net/~divmod-dev/divmod.org/trunk/files/head:/Reverend/
License: GNU Lesser General Public License v2.1
Home Page: http://bazaar.launchpad.net/~divmod-dev/divmod.org/trunk/files/head:/Reverend/
License: GNU Lesser General Public License v2.1
Reverend is a simple Bayesian classifier. It is designed to be easy to adapt and extend for your application. A simple example would look like: from reverend.thomas import Bayes guesser = Bayes() guesser.train('fish', 'salmon trout cod carp') guesser.train('fowl', 'hen chicken duck goose') guesser.guess('chicken tikka marsala') You can also "forget" some training: guesser.untrain('fish','salmon carp') The first argument of train is the bucket or class that you want associated with the training. If the bucket does not exists, Bayes will create it. The second argument is the object that you want Bayes to be trained on. By default, Bayes expects a string and uses something like string.split to break it into indidual tokens (words). It uses these tokens as the basis of its bookkeeping. The two ways to extend it are: 1. Pass in a function as the tokenizer when creating your Bayes. The function should expect one argument which will be whatever you pass to the train() method. The function should return a list of strings, which are the tokens that are relevant to your app. 2. Subclass Bayes and override the method getTokens to return a list of string tokens relevant to your app. I hope all you guesses are right, [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.