Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
J2ME-Bayes is a general purpose Naive Bayes Classifier to the Java Micro Edition platform.
branch: master
Failed to load latest commit information.
Classifier.java
README.mkd Arquivo README com exemplo de uso

README.mkd

J2ME-Bayes is a general purpose Naive Bayes Classifier to the Java Micro Edition platform. It consists in a simple class, easy to use for many proposals, including:

  • Classify m-spam;
  • Classify SMS by author, category, etc;
  • Detect the language of a text;
  • Classify any kind of document.

Simple example

Classifier classifier = new Classifier();

classifier.train("the and is if on in at a i you he she it we they", "English"); classifier.train("le la les dans cette du un une de en je vous il elle et", "French"); classifier.train("ein eine ich er sie der die das der wir und dieser", "German"); classifier.train("a e o ou se no na eu um uma eu ele ela voce isso isto", "Portuguese"); classifier.train("que ella y el las de la uno una en esta", "Spanish");

//Classify a Portuguese phrase which quotes an English sentence. classifier.classify("Se eu disser - 'The book is on the table.' - eu estarei falando uma frase muito batida em Inglês."); //returns "Portuguese"

Something went wrong with that request. Please try again.