##what's this? A small library to segment a string and to see if it's generated by random.
This project rewrite Peter Norvig's post in java. And some revision has been added such as the roughly selected frequent Chinese pinyins has been added to the word frequency file.
##Usage
- use default word probability distribution provided here http://norvig.com/ngrams/
Detector dt=new Detector();
dt.computeDefaultProbDist();
System.out.println(dt.segment("dhelloworldd"));
- use specified word probability distribution
Detector dt=new Detector();
dt.computeProbDist("/home/me/downloads/word_count.txt");
System.out.println(dt.segment("dhelloworldd"));
- just use jar followed by a string
##Contact
- mail(remindme2009#gmail.com, 把#换成@)