code: public void save(String modelFile, Set<Map.Entry<String, Integer>> featureIdSet, final double ratio, boolean text) throws IOException
      {
          float[] parameter = this.parameter;
          this.compress(ratio, 1e-3f);
  
          DataOutputStream out = new DataOutputStream(new BufferedOutputStream(IOUtil.newOutputStream(modelFile)));
          save(out);
          out.close();
  
          if (text)
          {
              BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(IOUtil.newOutputStream(modelFile + ".txt"), "UTF-8"));
              TagSet tagSet = featureMap.tagSet;
              for (Map.Entry<String, Integer> entry : featureIdSet)
              {
                  bw.write(entry.getKey());
                  if (featureIdSet.size() == parameter.length)
                  {
                      bw.write("\t");
                      bw.write(String.valueOf(parameter[entry.getValue()]));
                  }
                  else
                  {
                      for (int i = 0; i < tagSet.size(); ++i)
                      {
                          bw.write("\t");
                          bw.write(String.valueOf(parameter[entry.getValue() * tagSet.size() + i]));
                      }
                  }
                  bw.newLine();
              }
              bw.close();
          }
      }
docs: 保存
  
  @param modelFile    路径
  @param featureIdSet 特征集（有些数据结构不支持遍历，可以提供构造时用到的特征集来规避这个缺陷）
  @param ratio        压缩比
  @param text         是否输出文本以供调试
  @throws IOException