@Override
public char[] parseLanguage(String document) {
StringBuilder stringBuilder = new StringBuilder(document.length());
WordSegment wordSegmenter = new WordSegment(new JointMM());
List<String> segmented = wordSegmenter.segment(document);
for (String word : segmented) {
stringBuilder.append(word).append(" ");
}
return stringBuilder.toString().toCharArray();
}