public training(int lang_id, int category_id, string langauge, string stemming, bool addtur, int n, bool punctuation, int nov) { _cr = new classifier(langauge, stemming, addtur, n, punctuation, nov);//classifier hazır _category_sentence_count = new Dictionary <int, int>(); all_sentence_count = 0; word_dic _wd = new word_dic(); comment _c = new comment(); DataTable _dt = _c.select_comment(lang_id.ToString(), category_id.ToString()); int id = 1; int yuzde50 = _dt.Rows.Count / 2; foreach (DataRow row in _dt.Rows) // Loop over the rows. { var type = row[0]; string _sentence = row[1].ToString().ToLower(); int _type = Convert.ToInt32(type); _cr.AddSentenceforTraining(_sentence, _type); AddASentence(_type);//kategorideki cümle sayısı all_sentence_count++; id++; if (id == yuzde50) { break; } } }
public training() { _cr = null; _category_sentence_count = null; all_sentence_count = 0; }