public ArrayList GetNGram(int freq) { ArrayList sanduq = new ArrayList(); mBuf.GetAll(freq, sanduq); mBuf = null; mBuf = new TstTree(); return(sanduq); }
public ArrayList GetSorted(int freq) { ArrayList ret = new ArrayList(); mBuf.GetAll(freq, ret); mBuf = null; mBuf = new TstTree(); System.Console.WriteLine("Tiziwatidu Jemiy =" + ret.Count + " Soz"); ret.Sort(this); return(ret); }
public void Save(String name, int freq) { try{ StreamWriter ofs = new StreamWriter(name, false, Encoding.UTF8); mBuf.Save(ofs, freq); ofs.Close(); }catch (Exception ee) { System.Console.WriteLine(ee.Message); } mBuf = null; mBuf = new TstTree(); }