当前位置: 首页>>代码示例>>C#>>正文


C# DataAccessLayer.GetNowakhaliWord方法代码示例

本文整理汇总了C#中DataAccessLayer.GetNowakhaliWord方法的典型用法代码示例。如果您正苦于以下问题:C# DataAccessLayer.GetNowakhaliWord方法的具体用法?C# DataAccessLayer.GetNowakhaliWord怎么用?C# DataAccessLayer.GetNowakhaliWord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DataAccessLayer的用法示例。


在下文中一共展示了DataAccessLayer.GetNowakhaliWord方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Converter

        private string Converter(string value, string language, string sourceLanguage)
        {
            string[] words = new string[109];
            int wordsNumber = 0;
            DataAccessLayer dal = new DataAccessLayer();

            string[] aa = value.Split(' ');

            for (int i = 0; i < aa.Length; i++)
                if (aa[i] != "")
                {
                    words[wordsNumber] = aa[i];
                    wordsNumber++;
                }

            string outputSentence = "";

            int start = 0;

            while (start < wordsNumber)
            {

                Boolean flag = false;

                for (int i = wordsNumber - 1; i >= start; i--)
                {
                    string temp = "";

                    for (int j = start; j <= i; j++)
                    {
                        if (j != start)
                            temp += " ";
                        temp += words[j];
                    }

                    if (language[0].ToString().ToLower() == "c")
                    {
                        if (sourceLanguage[0].ToString().ToLower() == "l")
                            temp = dal.GetSuddoFromCTGWord(temp);
                        else
                            temp = dal.GetCTGWord(temp);
                    }
                    else if (language[0].ToString().ToLower() == "b")
                    {
                        if (sourceLanguage[0].ToString().ToLower() == "l")
                            temp = dal.GetSuddoFromBarishalWord(temp);
                        else
                            temp = dal.GetBarishalWord(temp);
                    }
                    else if (language[0].ToString().ToLower() == "n")
                    {
                        if (sourceLanguage[0].ToString().ToLower() == "l")
                            temp = dal.GetSuddoFromNowakhaliWord(temp);
                        else
                            temp = dal.GetNowakhaliWord(temp);
                    }
                    /*
                    else if (language[0].ToString().ToLower() == "r")
                    {
                        if (sourceLanguage[0].ToString().ToLower() == "l")
                            temp = dal.GetSuddoFromRajshahiWord(temp);
                        else
                            temp = dal.GetRajshahiWord(temp);
                    }
                    */
                    if (temp != "")
                    {
                        outputSentence += temp + " ";
                        start = i + 1;
                        flag = true;
                        break;
                    }
                }

                if (flag == false)
                {
                    outputSentence += words[start] + " ";
                    start++;
                }
            }

            outputSentence = outputSentence.Trim();

            return outputSentence;
        }
开发者ID:shakil0304003,项目名称:Bangla-language-to-nowakhali--borishal--chittagong---rajshahi-local-language-conversion-,代码行数:85,代码来源:Parser.cs


注:本文中的DataAccessLayer.GetNowakhaliWord方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。