Esempio n. 1
0
		public Slovo Translate(Predlozhenie pr,int place)
		{
			Slovo analyzed = pr[place];
			
			bool translated = false;
			
			if(analyzed.eSlovo == "FQV" || analyzed.eSlovo == "FZJ" || analyzed.eSlovo == "FZP")
			{
				analyzed.rSlovo = "";
				translated = true;
			}
			else if(analyzed.eSlovo == "FT")
			{
				if(place-1>0 && pr[place-1].eSlovo[0] != 'Q')
				{
					analyzed.rSlovo = "";
					translated = true;
				}
			}
			if(!translated)
			{
				Dictionary dict = new Dictionary();
				ArrayList al = dict.GetStrict(analyzed.eSlovo);
	            if(al.Count > 0)
				{
					analyzed.rSlovo = ((DictSlovo)al[0]).Rus;
				}
				else
	            {
					analyzed.rSlovo = analyzed.eSlovo;
				}
			}
			
			return analyzed;
		}	
Esempio n. 2
0
		public Slovo Translate(Predlozhenie pr,int place)
		{
			Slovo analyzed = pr[place];
			
			Dictionary dict = new Dictionary();
			ArrayList al = dict.GetStrict(analyzed.eSlovo);
            if(al.Count > 0)
			{
				analyzed.rSlovo = ((DictSlovo)al[0]).Rus;
			}
			else
            {
				analyzed.rSlovo = analyzed.eSlovo;
			}
			
			return analyzed;
		}	
Esempio n. 3
0
		public Slovo Translate(Predlozhenie pr,int place)
		{
			Slovo analyzed = pr[place];
			
			Dictionary dict = new Dictionary();
			ArrayList al = dict.GetStrict(analyzed.eSlovo);
            if(al.Count > 0)
			{
				analyzed.rSlovo = ((DictSlovo)al[0]).Rus;
			}
			else
            {
				analyzed.rSlovo = analyzed.eSlovo;
			}
			
		//	if(analyzed.chastRechi == ChastRechi.Mestoimenie)
				analyzed.rSlovo = MestChange(analyzed,analyzed.rSlovo);
			
			return analyzed;
		}	
Esempio n. 4
0
		protected void TranslateOsnova(ref Slovo slovo)
		{
			Dictionary dict = new Dictionary();
			ArrayList al = dict.GetStrict(osnova);
			if(slovo.eSlovo == "Q-")
				slovo.rSlovo = "я";
			else if(slovo.eSlovo == "W-")
				slovo.rSlovo = "ты";
			else if(al.Count > 0)
			{
				slovo.rSlovo = ((DictSlovo)al[0]).Rus;
			}
			else
			{
				slovo.rSlovo = "";
				//throw new ETRTranslatorException(ETRError.SlovaNetVSlovare,"Слово не найдено в словаре");
			}
		}
 protected void TranslateOsnova(ref Slovo slovo)
 {
     //Вытaскивaем из словaря русское слвоо в нaчaльной форме
     //MessageBox.Show(osnova);
     Dictionary dict = new Dictionary();
     ArrayList al = dict.GetStrict(osnova);
     if (al.Count > 0)
     {
         slovo.rSlovo = ((DictSlovo)al[0]).Rus;
     }
     else
     {
         slovo.rSlovo = "";
         throw new ETRTranslatorException(ETRError.SlovaNetVSlovare, "Слово не нaйдено в словaре");
     }
 }