Exemplo n.º 1
0
        private Poem Match2(string p)
        {
            Poem S = new Poem( );

            Probable Pr = Padyam.MostProbable(p, new MatchOptions( ));
            Padyam   P  = Pr.Padyam;

            P.MatchYati       = true;
            P.MatchPrasa      = true;
            P.AllowSantiPrasa = true;
            MatchResult MR = Pr.MatchResult;
            Rule        R  = Pr.Rule;

            S.Calculated = R.ShortName;
            S.HasMatach  = MR.IsMatched;
            S.Percentage = MR.Percentage.ToString( );
            S.Remarks    = MR.ShowErrors(OutputFormat.Text);

            string s = P.Build2(Pr.MatchResult);

            S.MarkingText = s;

            S.Yatis = ExtractYati(s);


            return(S);
        }
Exemplo n.º 2
0
        private static bool Match(string p1)
        {
            Probable    Pr = Padyam.MostProbable(p1);
            Padyam      P  = Pr.Padyam;
            MatchResult MR = Pr.MatchResult;

            //Rule R=Pr.Rule;
            return(MR.IsMatched);
        }
Exemplo n.º 3
0
	private void MostProbable()
	{
		string p = @"పలికెడిది భాగవత మఁట, 
పలికించెడివాడు రామభద్రుం డఁట, నేఁ
బలికిన భవహర మగునఁట, 
పలికెద, వేఱొండు గాథ బలుకఁగ నేలా?";
		Probable Pr = Padyam.MostProbable(p, MatchOptions.QucikMatchSettings);
		MatchResult MR = Pr.MatchResult;
		Padyam P = Pr.Padyam;
	}
Exemplo n.º 4
0
        public static Probable Determine(string s, MatchOptions Options)
        {
            if (s == null || s.Trim().Length == 0)
            {
                return(null);
            }
            Probable Pr = Padyam.MostProbable(s, Options);

            return(Pr);
        }
Exemplo n.º 5
0
        public static string Build(string s, string number, string type)
        {
            Probable Pr = Padyam.MostProbable(s, MatchOptions.QucikMatchSettings);

            if (Pr.MatchResult == null)
            {
                Debugger.Break( );
            }
            MatchResult MR = Pr.MatchResult;
            Rule        R  = Pr.Rule;
            Padyam      P  = Pr.Padyam;

            return(Build(MR, R, P, number, type));
        }
Exemplo n.º 6
0
        private void Identifier(string s)
        {
            MatchOptions Options = MatchOptions.QucikMatchSettings;

            Options.Language   = RuleLanguage.Kannada;
            Options.MatchYati  = false;
            Options.MatchPrasa = true;


            Probable    Pr = Padyam.MostProbable(s, Options);
            MatchResult MR = Pr.MatchResult;

            Console.Write(MR.Percentage);
        }
Exemplo n.º 7
0
        private static Stats Match2(string p)
        {
            Stats S = new Stats( );

            Probable    Pr = Padyam.MostProbable(p);
            Padyam      P  = Pr.Padyam;
            MatchResult MR = Pr.MatchResult;
            Rule        R  = Pr.Rule;


            S.Poem       = p;
            S.Calculated = R.Name;
            S.HasMatach  = MR.IsMatched;
            S.Percentage = MR.Percentage.ToString( );
            S.Remarks    = MR.ShowErrors(OutputFormat.Text);

            return(S);
        }
Exemplo n.º 8
0
        public static string Build2(string s, string number, string type, string skanda, string ghatta, ref int score)
        {
            Probable Pr = Padyam.MostProbable(s, MatchOptions.TradtionalMatchSettings);

            if (Pr == null || Pr.MatchResult == null)
            {
                Debugger.Break( );
                return("");
            }
            MatchResult MR = Pr.MatchResult;
            Rule        R  = Pr.Rule;
            Padyam      P  = Pr.Padyam;

            if (Pr.MatchResult.Percentage != 100)
            {
                score = 1;
            }
            score = 0;
            return(Build2(MR, R, P, s, number, type, skanda, ghatta));
        }