/// <summary> /// returns a type string by the given type /// </summary> /// <param name="returnOther">if true, the type other returns "Sonstige" as string, otherwise it returns an empty string</param> public static String GetTypeString(Word.EType type, bool returnOther = false) { switch (type) { case Word.EType.noun: return("Nomen"); case Word.EType.verb1: return("う-Verb"); case Word.EType.verb2: return("る-Verb"); case Word.EType.verb3: return("Irreguläres Verb"); case Word.EType.iAdjective: return("い-Adj"); case Word.EType.naAdjective: return("な-Adj"); case Word.EType.adverb: return("Adverb"); case Word.EType.particle: return("Partikel"); case Word.EType.other: return(returnOther ? "Sonstige" : ""); case Word.EType.prefix: return("Präfix"); case Word.EType.suffix: return("Suffix"); case Word.EType.phrase: return("Phrase"); default: return(""); } }
private static String GetTargetWord(String sourceWord, Word.EType sourceWordType, ConjugationData.ETargetForm targetForm) { //before i conjugate the wort into the target form i first bring the word from the masu into the ru form //the thing is, normaly the word whould already be in ru form but i saved all verbs in masu form //so i just convert them at the begining, later i will convert all verbs into the ru form before so //i don't have do convert it here //sourceWord = GetRuVerb(sourceWord, sourceWordType); switch (targetForm) { case ConjugationData.ETargetForm.ruForm: return(GetRuVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.naiForm: return(GetNaiVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.naiPastForm: return(GetNaiVerbPast(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.masuForm: return(GetMasuVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.masuNegativeForm: return(GetMasuVerbNegative(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.masuPastForm: return(GetMasuVerbPast(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.masuPastNegativeForm: return(GetMasuVerbPastNegative(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.teForm: return(GetTeVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.taForm: return(GetTaVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.imperativeForm: return(GetImperativeVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.prohibitiveForm: return(GetProhibitiveVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.volitionalForm: return(GetVolitionalVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.conditionalForm: return(GetConditionalVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.tai: return(GetTaiVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.sugi: return(GetSugiVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.yasui: return(GetYasuiVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.nikui: return(GetNikuiVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.potentialVerb: return(GetPotentialVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.passiveVerb: return(GetPassiveVerb(sourceWord, sourceWordType)); case ConjugationData.ETargetForm.causativeVerb: return(GetCausativeVerb(sourceWord, sourceWordType)); } return(""); }
private static String GetPassiveVerb(String sourceWord, Word.EType sourceWordType) { switch (sourceWordType) { case Word.EType.verb1: return(GetPassiveVerb1(sourceWord)); case Word.EType.verb2: return(GetPassiveVerb2(sourceWord)); case Word.EType.verb3: return(GetPassiveVerb3(sourceWord)); } return(""); }
//at the moment i only have verbs saved in masu form so this funktion takes the masu form and //converts it in the ru form, all other convert funktions can take this ru form and //convert it to its target form, later i want to save all verbs already in ru form so i don't need this step anymore public static String GetRuVerb(String sourceWord, Word.EType sourceWordType) { if (sourceWord == null) { return(null); } switch (sourceWordType) { case Word.EType.verb1: return(GetRuVerb1(sourceWord)); case Word.EType.verb2: return(GetRuVerb2(sourceWord)); case Word.EType.verb3: return(GetRuVerb3(sourceWord)); } return(""); }
private static String GetNikuiVerb(String sourceWord, Word.EType sourceWordType) { String masuVerb = GetMasuVerb(sourceWord, sourceWordType); return(masuVerb.Substring(0, masuVerb.Length - 2) + "にくい"); }
private static String GetProhibitiveVerb(String sourceWord, Word.EType sourceWordType) { return(sourceWord + "な"); }
private static String GetMasuVerbPastNegative(String sourceWord, Word.EType sourceWordType) { String masuForm = GetMasuVerb(sourceWord, sourceWordType); return(masuForm.Substring(0, masuForm.Length - 1) + "せんでした"); }
private static String GetNaiVerbPast(String sourceWord, Word.EType sourceWordType) { String naiForm = GetNaiVerb(sourceWord, sourceWordType); return(naiForm.Substring(0, naiForm.Length - 1) + "かった"); }