void TextModelIO::writeConfig(const KyteaConfig & config) { *str_ << "KyTea " << MODEL_IO_VERSION << " T " << config.getEncodingString() << endl; numTags_ = (int)config.getNumTags(); if(!config.getDoWS()) *str_ << "-nows" << endl; if(!config.getDoTags()) *str_ << "-notags" << endl; *str_ << "-numtags " << numTags_ << endl; if(config.getBias()<0) *str_ << "-nobias" << endl; *str_ << "-charw " << (int)config.getCharWindow() << endl << "-charn " << (int)config.getCharN() << endl << "-typew " << (int)config.getTypeWindow() << endl << "-typen " << (int)config.getTypeN() << endl << "-dicn " << (int)config.getDictionaryN() << endl << "-eps " << config.getEpsilon() << endl << "-solver " << config.getSolverType() << endl << endl; // write the character map *str_ << "characters" << endl << config.getStringUtil()->serialize() << endl; *str_ << endl; }