/** * [process description] * calls each registered filter/rule function to process each character */ public void Process() { ProcessEventArgs data = new ProcessEventArgs(); foreach (KeyValuePair <int, Dictionary <int, logvis> > verse in text_ready) { foreach (KeyValuePair <int, logvis> chars in verse.Value.ToList()) { data.Key1 = verse.Key; data.Key2 = chars.Key; OnProcess(data); } } }
/** * [filter_idgham_without_ghunna description] * check tajvid idgham without ghunna rules * @param [type] key1 [description] the position of the character in array / row * @param [type] key2 [description] the position of the character in array / column * @return [type] bool */ public void Filter_idgham_without_ghunna(object source, ProcessEventArgs e) { string[] erabha = new string[] { "\u064b", "\u064d", "\u064c" }; string[] n = new string[] { "\u0646", "\ufee5", "\ufee6", //ن "\ufee8", "\ufee7" }; string[] theseletter = new string[] { "\u0644", "\ufedd", "\ufede", "\ufedf", "\ufee0", "\u0631", "\ufead", "\ufeae" }; string[] sukon = new string[1] { "\u0652" }; bool rule1 = Wordrule_applyer(e.Key1, e.Key2, "idghamwg", erabha, theseletter); bool rule2 = Wordrule_applyer(e.Key1, e.Key2, "idghamwg", erabha, new string[1] { "erab" }, theseletter); bool rule3 = Wordrule_applyer(e.Key1, e.Key2, "idghamwg", n, sukon, theseletter); bool rule4 = Wordrule_applyer(e.Key1, e.Key2, "idghamwg", n, theseletter); /* * some of Quran surah that I checked manually for this filter : * ikhlas:4,maun:4,humaza:1 */ //return (rule1 || rule2 || rule3 || rule4); }
/** * [filter_lqlab description] * check tajvid lqlab rules * @param [type] key1 [description] the position of the character in array / row * @param [type] key2 [description] the position of the character in array / column * @return [type] bool */ public void Filter_lqlab(object source, ProcessEventArgs e) { string[] erabha = new string[] { "\u064b", "\u064d", "\u064c" }; string[] n = new string[] { "\u0646", "\ufee5", "\ufee6", //ن "\ufee8", "\ufee7" }; string[] b = new string[] { "\u0628", "\ufe8f", "\ufe90", //ب "\ufe91", "\ufe92" }; string[] sukon = new string[1] { "\u0652" }; bool rule1 = Wordrule_applyer(e.Key1, e.Key2, "lqlab", erabha, b); bool rule2 = Wordrule_applyer(e.Key1, e.Key2, "lqlab", erabha, new string[1] { "erab" }, b); bool rule3 = Wordrule_applyer(e.Key1, e.Key2, "lqlab", n, sukon, b); bool rule4 = Wordrule_applyer(e.Key1, e.Key2, "lqlab", n, b); /* * some of Quran surah that I checked manually for this filter : * baqara:10,18,19,27,31,33 */ //return (rule1 || rule2 || rule3 || rule4); }
/** * [filter_qalqala description] * check tajvid qalqala rules * @param [type] key1 [description] the position of the character in array / row * @param [type] key2 [description] the position of the character in array / column * @return [type] bool */ public void Filter_qalqala(object source, ProcessEventArgs e) { string[] charecters = new string[] { "\u0642", "\ufed5", "\ufed6", //ق "\ufed7", "\ufed8", "\u0637", "\ufec1", "\ufec2", //ط "\ufec3", "\ufec4", "\u0628", "\ufe8f", "\ufe90", //ب "\ufe91", "\ufe92", "\u062c", "\ufe9d", "\ufe9e", //ج "\ufea0", "\ufe9f", "\u062f", "\ufea9", //د "\ufeaa" }; string[] sukun = new string[1] { "\u0652" }; bool rule1 = Wordrule_applyer(e.Key1, e.Key2, "qalqala", charecters, sukun); bool rule2 = Wordrule_applyer(e.Key1, e.Key2, "qalqala", charecters, null, null, null, true, true); /* * some of Quran surah that I checked manually for this filter : * falaq,ikhlas,masadd,nasr,kafiroon,kauther */ //return (rule1 || rule2); }
/** * [filter_idgham description] * check tajvid idgham rules * @param [type] key1 [description] the position of the character in array / row * @param [type] key2 [description] the position of the character in array / column * @return [type] bool */ public void Filter_idgham(object source, ProcessEventArgs e) { string[] erabha = new string[] { "\u064b", "\u064d", "\u064c" }; string[] n = new string[] { "\u0646", "\ufee5", "\ufee6", "\ufee8", "\ufee7" }; string[] theseletter = new string[] { "\u064a", "\ufef1", "\ufef2", "\ufef3", "\ufef4", "\u0649", "\ufeef", "\uFef0", "\u0646", "\ufee5", "\ufee6", "\ufee7", "\ufee8", "\u0645", "\ufee1", "\ufee2", "\ufee3", "\ufee4", "\u0648", "\ufeed", "\ufeee" }; string[] m = new string[] { "\u0645", "\ufee1", "\ufee2", //م "\ufee4", "\ufee3" }; string[] sukon = new string[1] { "\u0652" }; string[] tasdid = new string[1] { "\u0651" }; bool rule1 = Wordrule_applyer(e.Key1, e.Key2, "idgham", erabha, theseletter); bool rule2 = Wordrule_applyer(e.Key1, e.Key2, "idgham", erabha, new string[1] { "erab" }, theseletter); bool rule3 = Wordrule_applyer(e.Key1, e.Key2, "idgham", n, sukon, theseletter); bool rule4 = Wordrule_applyer(e.Key1, e.Key2, "idgham", n, theseletter); bool rule5 = Wordrule_applyer(e.Key1, e.Key2, "idgham", m, sukon, m, tasdid); bool rule6 = Wordrule_applyer(e.Key1, e.Key2, "idgham", m, m, tasdid); /* * some of Quran surah that I checked manually for this filter : * masadd,kafiroon:4,quraish:4,fil:4,5,humaza:2,zalzala:7,8 */ //return (rule1 || rule2 || rule3 || rule4 || rule5 || rule6); }
/** * [filter_ikhfaa description] * check tajvid ikhfaa rules * @param [type] key1 [description] the position of the character in array / row * @param [type] key2 [description] the position of the character in array / column * @return [type] bool */ public void Filter_ikhfaa(object source, ProcessEventArgs e) { string[] theseletter = new string[] { "\u062a", "\ufe95", "\ufe96", //ت "\ufe97", "\ufe98", "\ufe99", "\u062b", "\ufe99", "\ufe9a", //ث "\ufe9c", "\ufe9b", "\u062c", "\ufe9d", "\ufe9e", //ج "\ufea0", "\ufe9f", "\u062f", "\ufea9", //د "\ufeaa", "\u0630", "\ufeab", //ذ "\ufeac", "\u0632", "\ufeaf", //ز "\ufeb0", "\u0633", "\ufeb1", "\ufeb2", //س "\ufeb3", "\ufeb4", "\u0634", "\ufeb5", "\ufeb6", //ش "\ufeb7", "\ufeb8", "\u0635", "\ufeb9", "\ufeba", //ص "\ufebb", "\ufebc", "\u0636", "\ufebd", "\ufebe", //ض "\ufebf", "\ufec0", "\u0637", "\ufec1", "\ufec2", //ط "\ufec3", "\ufec4", "\u0638", "\ufec5", "\ufec6", //ط "\ufec7", "\ufec8", "\u0641", "\ufed1", "\ufed2", //ف "\ufed3", "\ufed4", "\u0642", "\ufed5", "\ufed6", //ق "\ufed7", "\ufed8", "\u0643", "\ufed9", "\ufeda", //ک "\ufedb", "\ufedc" }; string[] erabha = new string[] { "\u064b", "\u064d", "\u064c" }; string[] n = new string[] { "\u0646", "\ufee5", "\ufee6", // ن "\ufee8", "\ufee7" }; string[] b = new string[] { "\u0628", "\ufe8f", "\ufe90", //ب "\ufe91", "\ufe92" }; string[] m = new string[] { "\u0645", "\ufee1", "\ufee2", //م "\ufee4", "\ufee3" }; string[] sukon = new string[1] { "\u0652" }; bool rule1 = Wordrule_applyer(e.Key1, e.Key2, "ikhfaa", erabha, theseletter); bool rule2 = Wordrule_applyer(e.Key1, e.Key2, "ikhfaa", n, sukon, theseletter); bool rule3 = Wordrule_applyer(e.Key1, e.Key2, "ikhfaa", m, sukon, b); bool rule4 = Wordrule_applyer(e.Key1, e.Key2, "ikhfaa", erabha, new string[1] { "erab" }, theseletter); /* * some of Quran surah that I checked manually for this filter : * falaq,masadd:3,kafiroon,maun,quraish:4,fil:4,baqare:17,10 */ //return (rule1 && rule2 && rule3 && rule4); }