Ejemplo n.º 1
0
 private void 同义词替换测试ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Thesaurus ts = new Thesaurus(System.IO.Path.Combine(Environment.CurrentDirectory, "SegmentDict") + System.IO.Path.DirectorySeparatorChar + "tyc.mdb");
     string s = @"味道很不错,很好吃,很开心,一点也不贵,很便宜,人很多,很挤,空间很狭窄";
     string d = ts.Replace(s);
     MessageBox.Show(s + Environment.NewLine + d);
 }