private void WriteHeader(Model m)
 {
     Writer.Write(m.Words);
     Writer.Write(' ');
     Writer.Write(m.Size);
     Writer.Write('\n');
 }
 public void Write(Model m)
 {
     WriteHeader(m);
     foreach (var wv in m.Vectors)
     {
         WriteWordVector(wv);
     }
 }
Exemple #3
0
 public static Model Load(IModelReader source)
 {
     var m = new Model(source.Words, source.Size);
     WordVector wv;
     while (null != (wv = source.ReadVector()))
     {
         m.AddVector(wv);
     }
     return m;
 }
        public void Write(Model m)
        {
            //Write the header
            WriteHeader(m);

            //Write the vectors
            foreach (var wv in m.Vectors)
            {
                WriteWordVector(wv);
            }
        }
 private void WriteHeader(Model m)
 {
     WriteString(string.Format("{0} {1}\n", m.Words, m.Size));
 }