public RulesVerbAndPronoun(Verb verb, Pronoun pronoun, TimeOfASentence timeOfASentence, TypeOfASentences typeOfASentences) { Verb = verb; Pronoun = pronoun; TypeOfASentences = typeOfASentences; TimeOfASentence = timeOfASentence; RealTranslate = null; }
public string getStringTime(Verb verb, Pronoun pronoun, Times time) { this.verb = verb; this.pronoun = pronoun; this.time = time; AboutPronoun.About(pronoun, ref person, ref number, ref gender); startTimeMethod(time); return($"{pronoun} {tempVerb}"); }
public static void About(Pronoun pronoun, ref Person person, ref Number number, ref Gender gender) { switch (pronoun) { case Pronoun.Я: person = Person.First; number = Number.Singular; gender = Gender.M; break; case Pronoun.Мы: person = Person.First; number = Number.Plural; gender = Gender.P; break; case Pronoun.Ты: person = Person.Second; number = Number.Singular; gender = Gender.MAFA; break; case Pronoun.Вы: person = Person.Second; number = Number.Plural; gender = Gender.P; break; case Pronoun.Он: person = Person.Third; number = Number.Singular; gender = Gender.M; break; case Pronoun.Она: person = Person.Third; number = Number.Singular; gender = Gender.F; break; case Pronoun.Оно: person = Person.Third; number = Number.Singular; gender = Gender.N; break; case Pronoun.Они: person = Person.Third; number = Number.Plural; gender = Gender.P; break; } }
public void setVerbAndPronoun(Verb verb, Pronoun pronoun) { this.verb = verb; this.pronoun = pronoun; }
public string GetLine_v2() { if (TimeOfASentence == TimeOfASentence.Настоящее) { if (TypeOfASentences == TypeOfASentences.Утверждение) { if (Pronoun.GetNameLower().Equals("she") || Pronoun.GetNameLower().Equals("he")) { string word = Verb.EnglishWord; char[] sim1 = new char[] { 'a', 'e', 'y', 'u', 'i' }; char[] sim2 = new char[] { 'o' }; if (sim1.Contains(word[word.Length - 1])) { word = word.Substring(0, word.Length - 1); word += "es"; } else if (sim2.Contains(word[word.Length - 1])) { word += "s"; } else { word += "es"; } return($"{Pronoun.GetNameWithUpper()} {word}."); } return($"{Pronoun.GetNameWithUpper()} {Verb.EnglishWord}."); } else if (TypeOfASentences == TypeOfASentences.Отрицание) { if (Pronoun.GetNameLower().Equals("she") || Pronoun.GetNameLower().Equals("he")) { return($"{Pronoun.GetNameWithUpper()} doesn't {Verb.EnglishWord}."); } return($"{Pronoun.GetNameWithUpper()} don't {Verb.EnglishWord}."); } else if (TypeOfASentences == TypeOfASentences.Вопрос) { if (Pronoun.GetNameLower().Equals("she") || Pronoun.GetNameLower().Equals("he")) { return($"Does {Pronoun.GetNameLower()} {Verb.EnglishWord}?"); } return($"Do {Pronoun.GetNameLower()} {Verb.EnglishWord}?"); } } else if (TimeOfASentence == TimeOfASentence.Будущее) { if (TypeOfASentences == TypeOfASentences.Утверждение) { return($"{Pronoun.GetNameWithUpper()} will {Verb.EnglishWord}."); } else if (TypeOfASentences == TypeOfASentences.Отрицание) { return($"{Pronoun.GetNameWithUpper()} will not {Verb.EnglishWord}."); } else if (TypeOfASentences == TypeOfASentences.Вопрос) { return($"Will {Pronoun.GetNameLower()} {Verb.EnglishWord}?"); } } else if (TimeOfASentence == TimeOfASentence.Прошедшее) { if (TypeOfASentences == TypeOfASentences.Утверждение) { return($"{Pronoun.GetNameWithUpper()} {Verb.EnglishWord_Past}."); } else if (TypeOfASentences == TypeOfASentences.Отрицание) { return($"{Pronoun.GetNameWithUpper()} didn't {Verb.EnglishWord}."); } else if (TypeOfASentences == TypeOfASentences.Вопрос) { return($"Did {Pronoun.GetNameLower()} {Verb.EnglishWord}?"); } } return(null); }