Java implementation of unsupervised CharaParser code