if("simple".equals(mode)) {
logger.info("use simple mode");
seg = new SimpleSeg(dic);
} else if("complex".equals(mode)) {
logger.info("use complex mode");
seg = new ComplexSeg(dic);
} else {
logger.info("use max-word mode");
seg = new MaxWordSeg(dic);
}
return seg;