public void setDictionary(Dictionary dict, boolean isSetSegDict) {
removeDictionary(isSetSegDict);
if(cws != null && isSetSegDict)
cws.setDictionary(dict);
dictPipe = null;
dictPipe = new DictPOSLabel(dict, labels);
oldfeaturePipe = featurePipe;
featurePipe = new SeriesPipes(new Pipe[] { dictPipe, featurePipe });
LinearViterbi dv = new ConstraintViterbi(
(LinearViterbi) getClassifier().getInferencer(),labels.size());
getClassifier().setInferencer(dv);