Esempio n. 1
0
        public DerivationSequence AddDerivation(DerivationRule derivationRule, string derivedWord)
        {
            bool derivationIsSilent = derivationRule.Attributes.Contains(DerivationAttribute.Silent);

            return(With(
                       allDerivationsTaken: AllDerivationsTaken.Add(derivationRule),
                       nonSilentDerivationsTaken: !derivationIsSilent ? NonSilentDerivationsTaken.Add(derivationRule) : null,
                       nonSilentWordFormProgression: !derivationIsSilent ? NonSilentWordFormProgression.Add(derivedWord) : null));
        }
 public static string UnconjugateWord(string word, DerivationRule derivation)
 {
     return(word.Substring(0, word.Length - derivation.ConjugatedEnding.Length) + derivation.UnconjugatedEnding);
 }