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