Exemplo n.º 1
0
        public async Task <IHttpActionResult <OpNameDto> > Get()
        {
            try
            {
                Adjective adj = await _adjService.ReadRandomAsync();

                Noun noun = await _nounService.ReadRandomAsync();

                if (adj == null || noun == null)
                {
                    return(Ok <OpNameDto>(new OpNameDto()));
                }

                OpNameDto opNameDto = new OpNameDto
                {
                    Adjective = adj.Value,
                    Noun      = noun.Value
                };
                return(Ok <OpNameDto>(opNameDto));
            }
            catch
            {
                return(InternalServerError <OpNameDto>(new OpNameDto()));
            }
        }
        public void LoadFromFile(string filePath)
        {
            this.adjectives.Clear();

            FileInfo fi = new FileInfo(filePath);
            TextReader tr = new StreamReader(fi.FullName, Encoding.Unicode, true);
            string line = null;
            try
            {
                while ((line = tr.ReadLine()) != null)
                {
#if DEBUG
                    if (line.Trim().StartsWith("EOF"))
                        break; // for testing purposes
#else
                    if (line.Trim().StartsWith("EOF"))
                        continue; // ignore

#endif
                    if (line.Trim().StartsWith(";"))
                        continue; // entry is commented out

                    Adjective adjective = new Adjective();
                    if (adjective.AnalyzeLine(line))
                        this.adjectives.Add(adjective);
                }
            }
            finally
            {
                tr.Close();
            }
        }
Exemplo n.º 3
0
    void Start()
    {
        string[] lines = new string[0];
        lines = File.ToString().Split('\n');
        Debug.Log("There are " + lines.Length + " words to be added");
        if (lines.Length > 500)
        {
            throw new System.Exception("Theres waaay to many ostriches. More then 500 items.");
        }
        for (int i = 1; i < lines.Length; i++)
        {
            string[] parts = lines[i].Split(',');

            Word word = new Word(parts);

            switch (parts[1])
            {
            case "Verb":
                Verb.Add(word);
                word.WordClass = WordClass.Verb;
                break;

            case "Adjective":
                Adjective.Add(word);
                word.WordClass = WordClass.Adjective;
                break;

            case "Noun":
                Noun.Add(word);
                word.WordClass = WordClass.Noun;
                break;
            }
        }
        set = true;
    }
Exemplo n.º 4
0
        public async Task <IHttpActionResult <AdjectiveDto> > Post([FromBody] AdjectiveDto adjDto)
        {
            try
            {
                Adjective adj = new Adjective
                {
                    Value            = adjDto.Value,
                    ModificationDate = DateTime.Now
                };
                if (await _adjService.ExistsAsync(adj))
                {
                    return(BadRequest <AdjectiveDto>("Entry already exists"));
                }
                else
                {
                    adj = await _adjService.CreateAsync(adj);

                    return(Ok(adj.ToAdjectiveDto()));
                }
            }
            catch
            {
                return(InternalServerError <AdjectiveDto>(new AdjectiveDto()));
            }
        }
Exemplo n.º 5
0
        public void BeingInFactionGrantsAdjectives()
        {
            var you = YouInARoom(out IWorld _);

            you.BaseStats["Savvy"] = 50; //allows use of medic skill

            var f = new Faction();

            f.Name = "Medical Corp";
            var medic = new Adjective(f)
            {
                Name = "Medic"
            };

            medic.BaseActions.Add(new HealAction(medic));
            f.Adjectives.Add(medic);

            Assert.IsFalse(you.Has("Medic", false));

            you.FactionMembership.Add(f);

            Assert.IsTrue(you.Has("Medic", false));
            Assert.AreEqual(1, you.GetFinalActions().OfType <HealAction>().Count());

            you.FactionMembership.Clear();

            Assert.IsFalse(you.Has("Medic", false));
        }
Exemplo n.º 6
0
 public static AdjectiveReadDto ToAdjectiveReadDto(this Adjective adj)
 {
     return(new AdjectiveReadDto
     {
         Value = adj.Value
     });
 }
Exemplo n.º 7
0
        public void AdjectiveConstructorTest()
        {
            var text   = "orangish";
            var target = new Adjective(text);

            Check.That(target.Text).IsEqualTo(text);
        }
    private static Element CreateElement(LoadedElement e)
    {
        if (string.IsNullOrEmpty(e.id))
        {
            throw new ArgumentException("element id can't be null or empty");
        }

        if (string.IsNullOrEmpty(e.name))
        {
            throw new ArgumentException("element name can't be null or empty");
        }

        if (e.phraseAssociations == null)
        {
            throw new ArgumentException("element's phrase association strings can't be null");
        }

        Adjective[] adjectives = null;

        if (e.adjectives != null)
        {
            adjectives = new Adjective[e.adjectives.Length];

            for (int i = 0; i < e.adjectives.Length; i++)
            {
                string adj = e.adjectives[i].Trim();

                adjectives[i] = Adjective.TryGetAdjectiveOrAdd(adj);
            }
        }

        Element element = new Element(e.id, e.name, adjectives, e.regionConstraints, e.phraseAssociations);

        return(element);
    }
Exemplo n.º 9
0
        public void Test_AdjectiveEquality()
        {
            var a1 = new Adjective(Mock.Of <IActor>())
            {
                Name = "Attractive"
            };

            var a2 = new Adjective(Mock.Of <IActor>())
            {
                Name = "Attractive"
            };

            Assert.AreNotEqual(a1, a2);

            var ac1 = new List <Adjective> {
                a1
            };

            var ac2 = new List <Adjective> {
                a2
            };

            //they are not equal but the user would consider them identical collections
            Assert.IsTrue(ac1.AreIdentical(ac2));
            Assert.AreNotEqual(ac1, ac2);
        }
        /// <summary>
        /// This method finds a  'Adjective' object.
        /// This method uses the 'Adjective_Find' procedure.
        /// </summary>
        /// <returns>A 'Adjective' object.</returns>
        /// </summary>
        public Adjective FindAdjective(FindAdjectiveStoredProcedure findAdjectiveProc, DataConnector databaseConnector)
        {
            // Initial Value
            Adjective adjective = null;

            // Verify database connection is connected
            if ((databaseConnector != null) && (databaseConnector.Connected))
            {
                // First Get Dataset
                DataSet adjectiveDataSet = this.DataHelper.LoadDataSet(findAdjectiveProc, databaseConnector);

                // Verify DataSet Exists
                if (adjectiveDataSet != null)
                {
                    // Get DataTable From DataSet
                    DataRow row = this.DataHelper.ReturnFirstRow(adjectiveDataSet);

                    // if row exists
                    if (row != null)
                    {
                        // Load Adjective
                        adjective = AdjectiveReader.Load(row);
                    }
                }
            }

            // return value
            return(adjective);
        }
Exemplo n.º 11
0
        public IAdjective Create(IWorld world, IHasStats s, AdjectiveBlueprint blueprint)
        {
            HandleInheritance(blueprint);

            var adj = new Adjective(s)
            {
                Name = blueprint.Name
            };

            base.AddBasicProperties(world, adj, blueprint, "inspect");

            if (blueprint.StatsRatio != null)
            {
                adj.StatsRatio = blueprint.StatsRatio;
            }

            if (blueprint.Resist != null)
            {
                adj.Resist = blueprint.Resist;
            }

            adj.IsPrefix = blueprint.IsPrefix;

            s.Adjectives.Add(adj);

            return(adj);
        }
        /// <summary>
        /// Saves a 'Adjective' object into the database.
        /// This method calls the 'Insert' or 'Update' method.
        /// </summary>
        /// <param name='adjective'>The 'Adjective' object to save.</param>
        /// <returns>True if successful or false if not.</returns>
        public bool Save(ref Adjective adjective)
        {
            // Initial value
            bool saved = false;

            // If the adjective exists.
            if (adjective != null)
            {
                // Is this a new Adjective
                if (adjective.IsNew)
                {
                    // Insert new Adjective
                    int newIdentity = this.Insert(adjective);

                    // if insert was successful
                    if (newIdentity > 0)
                    {
                        // Update Identity
                        adjective.UpdateIdentity(newIdentity);

                        // Set return value
                        saved = true;
                    }
                }
                else
                {
                    // Update Adjective
                    saved = this.Update(adjective);
                }
            }

            // return value
            return(saved);
        }
Exemplo n.º 13
0
        public static void AidiachtaiBearnai()
        {
            StreamWriter writer = new StreamWriter(@"E:\deleteme\aidiachtaí-bearnaí.txt");

            writer.Write("fillteán" + "\t" + "leama" + "\t" + "díochlaonadh");
            writer.Write("\t" + "fadhb");
            writer.Write("\t" + "ginideach firinsneach");
            writer.Write("\t" + "ginideach baininscneach");
            writer.Write("\t" + "iolra");
            writer.Write("\t" + "foirm chéimithe");
            writer.WriteLine();

            string[] folders = { "adjective", "adjectiveUnsafe" };
            foreach (string folder in folders)
            {
                foreach (string file in Directory.GetFiles(@"C:\MBM\Gramadan\BuNaMo\" + folder, "*.xml"))
                {
                    Console.WriteLine(file);
                    string problem = "";

                    Adjective a = new Adjective(file);
                    if (a.sgGenMasc.Count == 0 && a.sgGenFem.Count == 0)
                    {
                        problem += ", ginideach in easnamh";
                    }
                    if (a.sgGenMasc.Count != 0 && a.sgGenFem.Count == 0)
                    {
                        problem += ", ginideach baininscneach in easnamh";
                    }
                    if (a.sgGenMasc.Count == 0 && a.sgGenFem.Count != 0)
                    {
                        problem += ", ginideach firinscneach in easnamh";
                    }
                    if (a.plNom.Count == 0)
                    {
                        problem += ", iolra in easnamh";
                    }
                    if (a.graded.Count == 0)
                    {
                        problem += ", foirm chéimithe in easnamh";
                    }

                    if (problem.Length > 1)
                    {
                        problem = problem.Substring(2);
                    }
                    if (problem != "")
                    {
                        writer.Write(folder + "\t" + a.getLemma() + "\t" + a.declension);
                        writer.Write("\t" + problem);
                        writer.Write("\t" + PrintForms(a.sgGenMasc));
                        writer.Write("\t" + PrintForms(a.sgGenFem));
                        writer.Write("\t" + PrintForms(a.plNom));
                        writer.Write("\t" + PrintForms(a.graded));
                        writer.WriteLine();
                    }
                }
            }
            writer.Close();
        }
Exemplo n.º 14
0
        public void Test_HealingAnInjury()
        {
            var you = YouInARoom(out IWorld world);

            //you cannot heal yet
            Assert.IsFalse(you.GetFinalActions().OfType <HealAction>().Any());

            //you are a medic
            var medic = new Adjective(you)
            {
                Name = "Medic"
            };

            medic.BaseActions.Add(new HealAction(you));
            you.Adjectives.Add(medic);

            //now you can heal stuff
            Assert.IsTrue(you.GetFinalActions().OfType <HealAction>().Any());

            //give them an injury
            var injury = new Injured("Cut Lip", you, 2, InjuryRegion.Leg, world.InjurySystems.First(i => i.IsDefault));

            you.Adjectives.Add(injury);

            var stack = new ActionStack();

            you.BaseStats["Savvy"] = 20;

            Assert.Contains(injury, you.Adjectives.ToArray());
            stack.RunStack(world, new FixedChoiceUI(you, injury), you.GetFinalActions().OfType <HealAction>().Single(), you, you.GetFinalBehaviours());
            Assert.IsFalse(you.Adjectives.Contains(injury));
        }
Exemplo n.º 15
0
        public async Task <IHttpActionResult <string> > Import([FromBody] DataDto data)
        {
            try
            {
                int importedAdj  = 0;
                int importedNoun = 0;
                foreach (AdjectiveReadDto adjDto in data.Adjectives)
                {
                    Adjective adj = new Adjective {
                        Value = adjDto.Value, CreationDate = DateTime.Now, ModificationDate = DateTime.Now
                    };
                    await _adjService.CreateAsync(adj);

                    importedAdj++;
                }

                foreach (NounReadDto nounDto in data.Nouns)
                {
                    Noun noun = new Noun {
                        Value = nounDto.Value, CreationDate = DateTime.Now, ModificationDate = DateTime.Now
                    };
                    await _nounService.CreateAsync(noun);

                    importedNoun++;
                }
                return(Ok <string>("Imported " + importedAdj + " adjective(s) and " + importedNoun + " noun(s)."));
            }
            catch
            {
                return(InternalServerError <string>("Could not import."));
            }
        }
        /// <summary>
        /// This method creates the sql Parameters[] needed for
        /// update an existing adjective.
        /// </summary>
        /// <param name="adjective">The 'Adjective' to update.</param>
        /// <returns></returns>
        internal static SqlParameter[] CreateUpdateParameters(Adjective adjective)
        {
            // Initial Values
            SqlParameter[] parameters = new SqlParameter[3];
            SqlParameter   param      = null;

            // verify adjectiveexists
            if (adjective != null)
            {
                // Create parameter for [Syllables]
                param = new SqlParameter("@Syllables", adjective.Syllables);

                // set parameters[0]
                parameters[0] = param;

                // Create parameter for [WordText]
                param = new SqlParameter("@WordText", adjective.WordText);

                // set parameters[1]
                parameters[1] = param;

                // Create parameter for [Id]
                param         = new SqlParameter("@Id", adjective.Id);
                parameters[2] = param;
            }

            // return value
            return(parameters);
        }
Exemplo n.º 17
0
        public static Word SignalToEntity(SL.Word impulse)
        {
            Word word = null;

            if (typeof(Noun).Name.ToLowerInvariant() == impulse.Type.ToLowerInvariant())
            {
                word = new Noun
                {
                    Name       = impulse.Name,
                    Definition = impulse.Description,
                };
            }

            if (typeof(Adjective).Name.ToLowerInvariant() == impulse.Type.ToLowerInvariant())
            {
                word = new Adjective
                {
                    Name       = impulse.Name,
                    Definition = impulse.Description,
                };
            }

            if (typeof(Verb).Name.ToLowerInvariant() == impulse.Type.ToLowerInvariant())
            {
                word = new Verb
                {
                    Name       = impulse.Name,
                    Definition = impulse.Description,
                };
            }

            return(word);
        }
Exemplo n.º 18
0
 public static AdjectiveDto ToAdjectiveDto(this Adjective adj)
 {
     return(new AdjectiveDto
     {
         Id = adj.Id,
         Value = adj.Value
     });
 }
Exemplo n.º 19
0
        //Just quickly test something:
        public static void ShortTest()
        {
            Noun      n   = new Noun(@"C:\MBM\michmech\BuNaMo\noun\Gael_masc1.xml");
            Adjective adj = new Adjective(@"C:\MBM\michmech\BuNaMo\adjective\Gaelach_adj1.xml");
            NP        np  = new NP(n, adj);

            Console.WriteLine(np.print());
        }
Exemplo n.º 20
0
        public void GetSynonymsOfAdjectiveIsReflexive()
        {
            var pale   = new Adjective("pale");
            var pallid = new Adjective("pallid");

            Check.That(pale.GetSynonyms()).Contains("pallid");
            Check.That(pallid.GetSynonyms()).Contains("pale");
        }
Exemplo n.º 21
0
        /// <summary>
        /// This method deletes a 'Adjective' object.
        /// </summary>
        /// <param name='List<PolymorphicObject>'>The 'Adjective' to delete.
        /// <returns>A PolymorphicObject object with a Boolean value.
        internal PolymorphicObject DeleteAdjective(List <PolymorphicObject> parameters, DataConnector dataConnector)
        {
            // Initial Value
            PolymorphicObject returnObject = new PolymorphicObject();

            // If the data connection is connected
            if ((dataConnector != null) && (dataConnector.Connected == true))
            {
                // Create Delete StoredProcedure
                DeleteAdjectiveStoredProcedure deleteAdjectiveProc = null;

                // verify the first parameters is a(n) 'Adjective'.
                if (parameters[0].ObjectValue as Adjective != null)
                {
                    // Create Adjective
                    Adjective adjective = (Adjective)parameters[0].ObjectValue;

                    // verify adjective exists
                    if (adjective != null)
                    {
                        // Now create deleteAdjectiveProc from AdjectiveWriter
                        // The DataWriter converts the 'Adjective'
                        // to the SqlParameter[] array needed to delete a 'Adjective'.
                        deleteAdjectiveProc = AdjectiveWriter.CreateDeleteAdjectiveStoredProcedure(adjective);
                    }
                }

                // Verify deleteAdjectiveProc exists
                if (deleteAdjectiveProc != null)
                {
                    // Execute Delete Stored Procedure
                    bool deleted = this.DataManager.AdjectiveManager.DeleteAdjective(deleteAdjectiveProc, dataConnector);

                    // Create returnObject.Boolean
                    returnObject.Boolean = new NullableBoolean();

                    // If delete was successful
                    if (deleted)
                    {
                        // Set returnObject.Boolean.Value to true
                        returnObject.Boolean.Value = NullableBooleanEnum.True;
                    }
                    else
                    {
                        // Set returnObject.Boolean.Value to false
                        returnObject.Boolean.Value = NullableBooleanEnum.False;
                    }
                }
            }
            else
            {
                // Raise Error Data Connection Not Available
                throw new Exception("The database connection is not available.");
            }

            // return value
            return(returnObject);
        }
Exemplo n.º 22
0
        public async Task <Adjective> ReadRandomAsync()
        {
            int count = await _session.Select <Adjective>().CountAll().From().ScalarAsync <int>();

            int       offset = HelperService.GetRandomNumber(0, count);
            Adjective adj    = await _session.SelectAllFrom <Adjective>().OrderBy(x => x.Value).Limit(offset, 1).FirstOrDefaultAsync();

            return(adj);
        }
Exemplo n.º 23
0
        // hash code is based on hash codes of all combined names
        public override int GetHashCode()
        {
            int hash = 17;

            hash = hash * 31 + Plural.GetHashCode();
            hash = hash * 31 + Single.GetHashCode();
            hash = hash * 31 + Adjective.GetHashCode();
            return(base.GetHashCode());
        }
Exemplo n.º 24
0
        public void BindDescriptorTest()
        {
            var         target     = new CommonSingularNoun("dog");
            IDescriptor descriptor = new Adjective("red");

            target.BindDescriptor(descriptor);
            Check.That(target.Descriptors).Contains(descriptor).Only();
            Check.That(descriptor.Describes).IsEqualTo(target);
        }
Exemplo n.º 25
0
        public void ModifiersTest()
        {
            var text   = "funny";
            var target = new Adjective(text);
            IEnumerable <IAdverbial> actual;

            actual = target.AdverbialModifiers;
            Check.That(target.AdverbialModifiers).IsEmpty();
        }
Exemplo n.º 26
0
        public void BindDescriberTest()
        {
            var         target    = new CommonSingularNoun("dog");
            IDescriptor adjective = new Adjective("rambunctious");

            target.BindDescriptor(adjective);
            Check.That(target.Descriptors).Contains(adjective).Only();
            Check.That(adjective.Describes).IsEqualTo(target);
        }
Exemplo n.º 27
0
        public void BindDescriptorTest()
        {
            var         target     = new NounPhrase(new Determiner("the"), new Adjective("large"), new CommonSingularNoun("elephants"));
            IDescriptor descriptor = new Adjective("hungry");

            target.BindDescriptor(descriptor);
            Check.That(target.Descriptors).Contains(descriptor);
            Check.That(descriptor.Describes).IsEqualTo(target);
        }
Exemplo n.º 28
0
        public void ModifyWithTest()
        {
            var target = new Adjective("orangish");
            var adv    = new Adverb("demonstrably");
            var advp   = new AdverbPhrase(new[] { adv });

            target.ModifyWith(adv);
            target.ModifyWith(advp);
            Check.That(target.AdverbialModifiers).Contains(adv).And.Contains(advp);
        }
Exemplo n.º 29
0
        public void NounProcessAdjective()
        {
            Assert.AreEqual(this.Noun.Extensions.Count, 0);

            var adj = new Adjective(2, "adj", "_");

            this.Noun.Process(adj, this.SentenceGraph);

            Assert.AreEqual(this.Noun.Extensions.Count, 1);
            Assert.AreEqual(this.Noun.Extensions[0], adj);
        }
Exemplo n.º 30
0
 private string GetSubjectOfAdjectiveAt(int adjectiveIdx)
 {
     for (var idx = adjectiveIdx; idx < this.Args.Args.Count; idx++)
     {
         var arg = this.Args.Args[idx];
         if (!Adjective.IsAdjective(arg))
         {
             return(arg);
         }
     }
     return(null);
 }
Exemplo n.º 31
0
        public void DescriptorsTest()
        {
            var target = new NounPhrase(new Determiner("the"), new CommonSingularNoun("elephants"));
            IEnumerable <IDescriptor> actual;

            actual = target.Descriptors;
            Check.That(target.Descriptors).IsEmpty();
            IDescriptor descriptor = new Adjective("large");

            target.BindDescriptor(descriptor);
            Check.That(target.Descriptors).Contains(descriptor);
        }
        /// <summary>
        /// Blue Postfix
        /// </summary>
        /// <param name="word"></param>
        /// <param name="root"></param>
        /// <param name="endings"></param>
        /// <returns></returns>
        private string MakePostfixBlue(Adjective word, ref string root, string[] endings)
        {
            if (root.Length > 0)
            {
                string tmp = root.Substring(0, root.Length - 1); ;
                char lastLetter = root[root.Length - 1];

                string ending = tmp.Substring(tmp.Length - 1);
                if (ending == "i")
                {
                    root = root.Substring(0, root.Length - 2);
                    return endings[1];
                }
                else
                {
                    root = tmp;
                    return endings[0];
                }
            }
            else
                return "";
        }
Exemplo n.º 33
0
        public static Adjective operator +(Adjective a, Adjective b)
        {
            Adjective result = new Adjective();

            result.Text = a.Text;

            result.Strength = a.Strength * b.Strength;
            result.Dexterity = a.Dexterity * b.Dexterity;
            result.Constitution = a.Constitution * b.Constitution;
            result.Intelligence = a.Intelligence * b.Intelligence;
            result.Wisdom = a.Wisdom * b.Wisdom;
            result.Charisma = a.Charisma * b.Charisma;
            result.Weight = a.Weight * b.Weight;
            result.Value = a.Value * b.Value;
            result.Damage = a.Damage * b.Damage;
            result.Defense = a.Defense * b.Defense;
            result.Accuracy = a.Accuracy * b.Accuracy;
            result.Health = a.Health * b.Health;
            result.Uses = a.Uses * b.Uses;
            result.Experience = a.Experience * b.Experience;

            return result;
        }
Exemplo n.º 34
0
 public void InsertAdjective(Adjective adjective)
 {
     _adjectives.Create(adjective);
     _uow.Commit();
 }
Exemplo n.º 35
0
 override public void MutateAdjective(Adjective adjective) {
   if (adjective.CanQualify()) {
     adjective.SetQuantity(this.number);
   }
 }
Exemplo n.º 36
0
 virtual public void MutateAdjective(Adjective adjective){}
Exemplo n.º 37
0
 override public void MutateAdjective(Adjective adjective) {
   adjective.adverbDelegate = this;
   this.adjective = adjective;
 }
        /// <summary>
        /// Used with Red postfix
        /// </summary>
        /// <param name="word"></param>
        /// <param name="root"></param>
        /// <returns></returns>
        private string Soften(Adjective word, string root)
        {
            if (root.Length > 1)
            {
                string let2 = root.Substring(root.Length - 2);
                string roo1 = root.Substring(0, root.Length - 2);
                switch (let2)
                {
                    #region Zamiana "y" na "i"

                    case "by":
                        {
                            return roo1 + "bi";
                        }
                    case "my":
                        {
                            return roo1 + "mi";
                        }
                    case "ny":
                        {
                            return roo1 + "ni";
                        }
                    case "wy":
                        {
                            return roo1 + "wi";
                        }

                    #endregion

                    #region Wymiana spó³g³oski, "y" pozostaje "y"

                    case "ry":
                        {
                            return roo1 + "rzy";
                        }

                    #endregion

                    #region Wymiana spó³g³oski, "i" przechodzi w "y"

                    case "ki":
                        {
                            return roo1 + "cy";
                        }
                    case "gi":
                        {
                            return roo1 + "dzy";
                        }

                    #endregion

                    #region Wymiana spó³g³oski, "y" przechodzi w "i"

                    case "³y":
                        {
                            return roo1 + "li";
                        }

                    case "ty":
                        {
                            return roo1 + "ci";
                        }

                    #endregion

                    default:
                        {
                            if (root.Length > 2)
                            {
                                string let3 = root.Substring(root.Length - 3);
                                string roo2 = root.Substring(0, root.Length - 3);

                                switch (let3)
                                {
                                    #region 3 literowa Wymiana spó³g³oski, "y" przechodzi w "i"

                                    case "szy":
                                        {
                                            return roo2 + "si";
                                        }
                                    case "chy":
                                        {
                                            return roo2 + "si";
                                        }
                                    case "sty":
                                        {
                                            return roo2 + "ści";
                                        }
                                    #endregion

                                    default:
                                        {
                                            return root; // reszta bez zmian
                                            /*
                                             * Uwaga na koñcówkê "¿y", która czasem zamienia siê na "zi"
                                             * a czasem zostaje bez zmian. Takie wyrazy wymagaj¹ obs³ugi wyj¹tków
                                             */
                                        }


                                }
                            }
                            else
                                return root;
                        }

                }
            }
            else
                return "";
        }
 public string MakeWord(Adjective word, Noun noun, InflectionCase aCase, DecliantionNumber amount,
     AdjectiveLevel level)
 {
     return MakeWord(word, (noun.HasIrregularGenre) ? noun.IrregularGenre : noun.Genre,
         aCase, amount, level);
 }
 public string MakeWord(Adjective word, GrammaticalGender genre, InflectionCase aCase, DecliantionNumber amount)
 {
     return MakeWord(word, genre, aCase, amount, AdjectiveLevel.Equal);
 }
        public string MakeWord(Adjective word, GrammaticalGender genre, InflectionCase aCase,
            DecliantionNumber amount, AdjectiveLevel level)
        {
            // check all arguments are provided...
            if (genre == GrammaticalGender._Unknown || aCase == InflectionCase._Unknown
                || amount == DecliantionNumber._Unknown || level == AdjectiveLevel._Unknown)
                return null;

            // constants
            if (word.IsConstant)
                return word.Root;

            // check word has exceptions
            if (word.IsException)
            {
                string except = word.GetForm(genre, aCase, amount, level);
                if (except != null)
                    return except; // alse - calculate own...
            }

            // now check if word has locked levels
            if (useNonLevellingRule && !word.CanBeLevelled &&
                (level == AdjectiveLevel.Higher || level == AdjectiveLevel.Highest))
                return null;

            string prefix = "";
            string postfix = "";
            string root = word.Root;

            // pick valid prefix for declination

            #region Levelling

            switch (level)
            {
                case AdjectiveLevel.Equal:
                    {
                        // nothing
                        break;
                    }
                case AdjectiveLevel.Higher:
                    {
                        if (!word.IsLevelledComplex && !string.IsNullOrEmpty(word.LevelHigherForm))
                            root = word.LevelHigherForm;
                        else
                            prefix = "bardziej ";
                        break;
                    }
                case AdjectiveLevel.Highest:
                    {
                        if (!word.IsLevelledComplex && !string.IsNullOrEmpty(word.LevelHighestForm))
                            root = word.LevelHighestForm;
                        else
                            prefix = "najbardziej ";
                        break;
                    }
            }

            #endregion

            // Chnage root / postfix depending of selected gender, number etc

            switch (amount)
            {
                #region DecliantionNumber.Singular

                case DecliantionNumber.Singular:
                    {
                        switch (genre)
                        {
                            case GrammaticalGender.MasculinePerson:
                            case GrammaticalGender.MasculineLife:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "go";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "mu";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "go";
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case GrammaticalGender.MasculineThing:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "go";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "mu";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case GrammaticalGender.Feminine:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                //postfix = MakePostfix(word, ref root, ending_A_IA);
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "j";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "j";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfixBlue(word, ref root, ending_Aa_IAa);
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfixBlue(word, ref root, ending_Aa_IAa);
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "j";
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case GrammaticalGender.Neuter:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "go";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                postfix += "mu";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                    }
                                    break;
                                }
                        }
                        break;
                    }

                #endregion

                #region DecliantionNumber.Plural

                case DecliantionNumber.Plural:
                    {
                        switch (genre)
                        {
                            case GrammaticalGender.MasculinePerson:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                if (root.EndsWith("cona") || root.EndsWith("iona"))
                                                {
                                                    root = root.Substring(0, root.Length - 3);
                                                    postfix = "eni";
                                                }
                                                else
                                                {
                                                    root = this.MakeWord(word, genre, InflectionCase.Nominative, DecliantionNumber.Singular, level);
                                                    root = Soften(word, root);
                                                    //postfix = MakePostfix(word, ref root, ending_I_Y);
                                                    prefix = ""; // above launch of MakeWord will add prefix either
                                                }
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "ch";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "ch";
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "mi";
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "ch";
                                                break;
                                            }
                                    }
                                    break;
                                }
                            case GrammaticalGender.Feminine:
                            case GrammaticalGender.MasculineLife:
                            case GrammaticalGender.MasculineThing:
                            case GrammaticalGender.Neuter:
                                {
                                    switch (aCase)
                                    {
                                        case InflectionCase.Nominative:
                                        case InflectionCase.Vocative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                break;
                                            }
                                        case InflectionCase.Genitive:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "ch";
                                                break;
                                            }
                                        case InflectionCase.Dative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "m";
                                                break;
                                            }
                                        case InflectionCase.Accusative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_E_IE);
                                                break;
                                            }
                                        case InflectionCase.Ablative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "mi";
                                                break;
                                            }
                                        case InflectionCase.Locative:
                                            {
                                                postfix = MakePostfix(word, ref root, ending_I_Y);
                                                postfix += "ch";
                                                break;
                                            }
                                    }
                                    break;
                                }
                        }
                        break;
                    }

                #endregion
            }

            return string.Format("{0}{1}{2}", prefix, root, postfix);
        }