public bool TransitionPossible(TxtWord root, State fromState) { if (root.IsAdjective() && (root.IsNominal() && !root.IsExceptional() || root.IsPronoun()) && _toState.GetName() == "NominalRoot(ADJ)" && _with == "0") { return(false); } if (root.IsAdjective() && root.IsNominal() && _with == "^DB+VERB+ZERO+PRES+A3PL" && fromState.GetName() == "AdjectiveRoot") { return(false); } if (root.IsAdjective() && root.IsNominal() && _with == "SH" && fromState.GetName() == "AdjectiveRoot") { return(false); } if (_with == "ki") { return(root.TakesRelativeSuffixKi()); } if (_with == "kü") { return(root.TakesRelativeSuffixKu()); } if (_with == "dHr") { if (_toState.GetName() == "Adverb") { return(true); } return(root.TakesSuffixDIRAsFactitive()); } if (_with == "Hr" && (_toState.GetName() == "AdjectiveRoot(VERB)" || _toState.GetName() == "OtherTense" || _toState.GetName() == "OtherTense2")) { return(root.TakesSuffixIRAsAorist()); } return(true); }
/** * <summary>The softenDuringSuffixation method takes a {@link TxtWord} root as an input. It checks two cases; first case returns * true if the given root is nominal or adjective and has one of the flags "IS_SD, IS_B_SD, IS_SDD" and with variable * equals o one of the strings "Hm, nDAn, ncA, nDA, yA, yHm, yHz, yH, nH, nA, nHn, H, sH, Hn, HnHz, HmHz". * <p/> * And the second case returns true if the given root is verb and has the "F_SD" flag, also with variable starts with * "Hyor" or equals one of the strings "yHs, yAn, yA, yAcAk, yAsH, yHncA, yHp, yAlH, yArAk, yAdur, yHver, yAgel, yAgor, * yAbil, yAyaz, yAkal, yAkoy, yAmA, yHcH, HCH, Hr, Hs, Hn, yHn", yHnHz, Ar, Hl").</summary> * * <param name="root">{@link TxtWord} input.</param> * <returns>true if there is softening during suffixation of the given root, false otherwise.</returns> */ public bool SoftenDuringSuffixation(TxtWord root) { if ((root.IsNominal() || root.IsAdjective()) && root.NounSoftenDuringSuffixation() && (_with == "Hm" || _with == "nDAn" || _with == "ncA" || _with == "nDA" || _with == "yA" || _with == "yHm" || _with == "yHz" || _with == "yH" || _with == "nH" || _with == "nA" || _with == "nHn" || _with == "H" || _with == "sH" || _with == "Hn" || _with == "HnHz" || _with == "HmHz")) { return(true); } if (root.IsVerb() && root.VerbSoftenDuringSuffixation() && (_with.StartsWith("Hyor") || _with == "yHs" || _with == "yAn" || _with == "yA" || _with.StartsWith("yAcAk") || _with == "yAsH" || _with == "yHncA" || _with == "yHp" || _with == "yAlH" || _with == "yArAk" || _with == "yAdur" || _with == "yHver" || _with == "yAgel" || _with == "yAgor" || _with == "yAbil" || _with == "yAyaz" || _with == "yAkal" || _with == "yAkoy" || _with == "yAmA" || _with == "yHcH" || _with == "HCH" || _with.StartsWith("Hr") || _with == "Hs" || _with == "Hn" || _with == "yHn" || _with == "yHnHz" || _with.StartsWith("Ar") || _with == "Hl")) { return(true); } return(false); }