غلط یاب فارسی در دات نت با استفاده از امکانات open office
نویسنده: وحید نصیری
تاریخ: ۱۳۸۷/۱۲/۱۸ ۱۶:۵۸:۰۰
آدرس: www.dntips.ir
| مطالب | ۳۶۹۴ |
| نویسندگان | ۲۷۶ |
| گروههای مطالب | ۱۰۲۴ |
| نقشههای راه | ۱۱۹ |
| دورهها | ۱۴ |
| اشتراکها | ۱۷۹۱۴ |
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using NHunspell;
namespace testWinForms87
{
class CSpellCheck
{
public static void Test()
{
using (Hunspell hunspell = new Hunspell(@"fa_ir.aff", @"fa_ir.dic"))
{
bool correct = hunspell.Spell("دباق");
if (correct)
MessageBox.Show("مشکلی نیست!");
else
{
List<string> suggestions = hunspell.Suggest("دباق");
string result = string.Empty;
foreach (string suggestion in suggestions)
{
result += suggestion + Environment.NewLine;
}
if (result != string.Empty)
MessageBox.Show(result,"لیست پیشنهادها");
}
}
}
}
}