Exemple #1
0
        private void Dump2()
        {
            StreamWriter SW  = new StreamWriter("Vruttas2Jati2_Kannada.txt", false, Encoding.UTF8);
            int          cnt = 1;

            SW.WriteLine("S.No~Chandam Name~Chandam No.~Vruttam No~Name~Alias~Identifier~Raw Sequence~Jati Sequence~Jati Explained~Total Sequences Available");
            foreach (KeyValuePair <string, VJ> KVP in Dict)
            {
                VJ   V = KVP.Value;
                Rule R = V.Rule;

                string g  = V.List.Count > 0 ? GetSequenceName(V.List[0]) : "";
                string s1 = V.List.Count > 0 ? V.List[0] : "";
                string s  = (cnt++) + "~" + R.ChandamName + "~" + R.CharLength + "~" + R.ChandamNumber + "~" + R.ShortName + "~" + R.Alias + " ~ " + R.Identifier + " ~ " + R.Sequence + "~" + s1 + "~" + g + "~" + V.List.Count;
                SW.WriteLine(s);
            }
            SW.Close();
        }
Exemple #2
0
        private void Dump(int tot)
        {
            StreamWriter SW = new StreamWriter("Vruttas2Jati_Kannada.txt", false, Encoding.UTF8);

            SW.WriteLine("<Total Vrutta's Considered :" + tot + ">");
            SW.WriteLine("<Total Vrutta's Found which can be translated as  Jati :" + Dict.Count + ">");
            SW.WriteLine("Percentage :" + ((Dict.Count * 100) / tot).ToString("0.0"));
            SW.WriteLine("");


            int    cnt  = 1;
            string prev = "";

            foreach (KeyValuePair <string, VJ> KVP in Dict)
            {
                VJ   V = KVP.Value;
                Rule R = V.Rule;

                string curr = "<<" + R.ChandamName + (R.ChandamNumber > 0 ? "(" + R.CharLength + ")" : " ") + ">>";

                if (prev != curr)
                {
                    SW.WriteLine(curr);
                    SW.WriteLine("");
                }
                SW.WriteLine((cnt++) + " " + R.Name + " : [" + R.Identifier + "] >> " + R.Sequence);
                for (int i = 0; i < V.List.Count; i++)
                {
                    string g = GetSequenceName(V.List[i]);
                    SW.WriteLine("\t" + (i + 1) + "." + " " + V.List[i] + " >> " + g);
                }

                prev = curr;
                SW.WriteLine(" ");
            }

            SW.Close();
        }