private static List <string> GetGozashtehNaghliSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbInflection = new VerbInflection(inflection.VerbRoot, AttachedPronounType.AttachedPronoun_NONE, "",
                                                    PersonType.PERSON_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                                    inflection.Positivity);
            var    tempLst = GetPayehFelInflections(verbInflection);
            string fel     = tempLst[0];

            switch (inflection.Person)
            {
            case PersonType.THIRD_PERSON_PLURAL:
                fel += "‌اند";
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                fel += "‌ای";
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                fel += "‌اید";
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                fel += "‌ام";
                break;

            case PersonType.FIRST_PERSON_PLURAL:
                fel += "‌ایم";
                break;
            }
            lstInflections.Add(AddAttachedPronoun(fel, inflection));
            return(lstInflections);
        }
示例#2
0
        private static List <string> GetGozashtehNaghliSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbInflection = new VerbInflection(inflection.VerbStem, ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                    ShakhsType.Shakhs_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                                    inflection.Positivity);
            var    tempLst = GetPayehFelInflections(verbInflection);
            string fel     = tempLst[0];

            switch (inflection.Shakhs)
            {
            case ShakhsType.SEVVOMSHAKHS_JAM:
                fel += "‌اند";
                break;

            case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                fel += "‌ای";
                break;

            case ShakhsType.DOVVOMSHAKHS_JAM:
                fel += "‌اید";
                break;

            case ShakhsType.AVALSHAKHS_MOFRAD:
                fel += "‌ام";
                break;

            case ShakhsType.AVALSHAKHS_JAM:
                fel += "‌ایم";
                break;
            }
            lstInflections.Add(AddZamirPeyvasteh(fel, inflection));
            return(lstInflections);
        }
 /// <summary>
 /// return the possible string representation of a specified verb inflection
 /// </summary>
 /// <param name="inflection">inflection</param>
 /// <returns>a list of string representations</returns>
 public static List<string> GetInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     switch (inflection.TenseForm)
     {
         case TenseFormationType.AMR:
             lstInflections = GetAmrInflections(inflection);
             break;
         case TenseFormationType.GOZASHTEH_ESTEMRAARI:
             lstInflections = GetGozashtehEstemrariInflections(inflection);
             break;
         case TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI:
             lstInflections = GetGozashtehNaghliEstemraiSadehInflections(inflection);
             break;
         case TenseFormationType.GOZASHTEH_NAGHLI_SADEH:
             lstInflections = GetGozashtehNaghliSadehInflections(inflection);
             break;
         case TenseFormationType.GOZASHTEH_SADEH:
             lstInflections = GetGozashtehSadehInflections(inflection);
             break;
         case TenseFormationType.HAAL_ELTEZAMI:
             lstInflections = GetHaalEltezamiInflections(inflection);
             break;
         case TenseFormationType.HAAL_SAADEH:
             lstInflections = GetHaalSaadehInflections(inflection);
             break;
         case TenseFormationType.HAAL_SAADEH_EKHBARI:
             lstInflections = GetHaalSaadehEkhbaariInflections(inflection);
             break;
         case TenseFormationType.PAYEH_MAFOOLI:
             lstInflections = GetPayehFelInflections(inflection);
             break;
     }
     return lstInflections;
 }
        private static List <string> GetPayehFelInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();

            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                lstInflections.Add(inflection.VerbRoot.Prefix + inflection.VerbRoot.PastTenseRoot + "ه");
                break;

            case TensePositivity.NEGATIVE:
                if (inflection.VerbRoot.PastRootVowelStart == "A" && inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    var verbBuilder = new StringBuilder();
                    verbBuilder.Append(inflection.VerbRoot.Prefix + "ن");
                    if (!inflection.VerbRoot.PastTenseRoot.StartsWith("آ"))
                    {
                        verbBuilder.Append("ی");
                    }
                    else
                    {
                        verbBuilder.Append("یا");
                    }
                    verbBuilder.Append(inflection.VerbRoot.PastTenseRoot.Remove(0, 1));
                    verbBuilder.Append("ه");
                    lstInflections.Add(verbBuilder.ToString());
                }
                else
                {
                    lstInflections.Add(inflection.VerbRoot.Prefix + "ن" + inflection.VerbRoot.PastTenseRoot + "ه");
                }
                break;
            }
            return(lstInflections);
        }
        private static List <string> GetGozashtehNaghliEstemraiSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbRoot.Prefix);
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                verbBuilder.Append("می‌");
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("نمی‌");
                break;
            }
            var verb = new Verb("", inflection.VerbRoot.PastTenseRoot,
                                inflection.VerbRoot.PresentTenseRoot, "",
                                "", inflection.VerbRoot.Transitivity, VerbType.SADEH,
                                inflection.VerbRoot.CanBeImperative, inflection.VerbRoot.PresentRootConsonantVowelEndStem, inflection.VerbRoot.PastRootVowelStart, inflection.VerbRoot.PresentRootVowelStart);
            var verbInflection = new VerbInflection(verb, AttachedPronounType.AttachedPronoun_NONE, "",
                                                    PersonType.PERSON_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                                    TensePositivity.POSITIVE);
            var tempLst = GetPayehFelInflections(verbInflection);

            verbBuilder.Append(tempLst[0]);
            switch (inflection.Person)
            {
            case PersonType.THIRD_PERSON_PLURAL:
                verbBuilder.Append("‌اند");
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                verbBuilder.Append("‌ای");
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                verbBuilder.Append("‌اید");
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                verbBuilder.Append("‌ام");
                break;

            case PersonType.FIRST_PERSON_PLURAL:
                verbBuilder.Append("‌ایم");
                break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
示例#6
0
        private static List <string> GetGozashtehNaghliEstemraiSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbStem.Pishvand);
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                verbBuilder.Append("می‌");
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("نمی‌");
                break;
            }
            var verb = new Verb("", inflection.VerbStem.HastehMazi,
                                inflection.VerbStem.HastehMozareh, "",
                                "", inflection.VerbStem.Transitivity, VerbType.SADEH,
                                inflection.VerbStem.AmrShodani, inflection.VerbStem.HastehMozarehConsonantVowelEndStem, inflection.VerbStem.HastehMaziVowelStart, inflection.VerbStem.HastehMozarehVowelStart);
            var verbInflection = new VerbInflection(verb, ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                    ShakhsType.Shakhs_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                                    TensePositivity.POSITIVE);
            var tempLst = GetPayehFelInflections(verbInflection);

            verbBuilder.Append(tempLst[0]);
            switch (inflection.Shakhs)
            {
            case ShakhsType.SEVVOMSHAKHS_JAM:
                verbBuilder.Append("‌اند");
                break;

            case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                verbBuilder.Append("‌ای");
                break;

            case ShakhsType.DOVVOMSHAKHS_JAM:
                verbBuilder.Append("‌اید");
                break;

            case ShakhsType.AVALSHAKHS_MOFRAD:
                verbBuilder.Append("‌ام");
                break;

            case ShakhsType.AVALSHAKHS_JAM:
                verbBuilder.Append("‌ایم");
                break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
示例#7
0
        private static List <string> GetGozashtehEstemrariInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbStem.Pishvand);
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                verbBuilder.Append("می‌" + inflection.VerbStem.HastehMazi);
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("نمی‌" + inflection.VerbStem.HastehMazi);
                break;
            }
            if (inflection.VerbStem.HastehMazi.EndsWith("آ"))
            {
                verbBuilder.Remove(verbBuilder.Length - 1, 1);
                verbBuilder.Append("ی");
            }
            else if (inflection.VerbStem.HastehMazi.EndsWith("ا") || inflection.VerbStem.HastehMazi.EndsWith("و"))
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Shakhs)
            {
            case ShakhsType.AVALSHAKHS_JAM:
                verbBuilder.Append("یم");
                break;

            case ShakhsType.AVALSHAKHS_MOFRAD:
                verbBuilder.Append("م");
                break;

            case ShakhsType.DOVVOMSHAKHS_JAM:
                verbBuilder.Append("ید");
                break;

            case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                verbBuilder.Append("ی");
                break;

            case ShakhsType.SEVVOMSHAKHS_JAM:
                verbBuilder.Append("ند");
                break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
        private static List <string> GetGozashtehEstemrariInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbRoot.Prefix);
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                verbBuilder.Append("می‌" + inflection.VerbRoot.PastTenseRoot);
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("نمی‌" + inflection.VerbRoot.PastTenseRoot);
                break;
            }
            if (inflection.VerbRoot.PastTenseRoot.EndsWith("آ"))
            {
                verbBuilder.Remove(verbBuilder.Length - 1, 1);
                verbBuilder.Append("ی");
            }
            else if (inflection.VerbRoot.PastTenseRoot.EndsWith("ا") || inflection.VerbRoot.PastTenseRoot.EndsWith("و"))
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Person)
            {
            case PersonType.FIRST_PERSON_PLURAL:
                verbBuilder.Append("یم");
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                verbBuilder.Append("م");
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                verbBuilder.Append("ید");
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                verbBuilder.Append("ی");
                break;

            case PersonType.THIRD_PERSON_PLURAL:
                verbBuilder.Append("ند");
                break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
        /// <summary>
        /// return the possible string representation of a specified verb inflection
        /// </summary>
        /// <param name="inflection">inflection</param>
        /// <returns>a list of string representations</returns>
        public static List <string> GetInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();

            switch (inflection.TenseForm)
            {
            case TenseFormationType.AMR:
                lstInflections = GetAmrInflections(inflection);
                break;

            case TenseFormationType.GOZASHTEH_ESTEMRAARI:
                lstInflections = GetGozashtehEstemrariInflections(inflection);
                break;

            case TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI:
                lstInflections = GetGozashtehNaghliEstemraiSadehInflections(inflection);
                break;

            case TenseFormationType.GOZASHTEH_NAGHLI_SADEH:
                lstInflections = GetGozashtehNaghliSadehInflections(inflection);
                break;

            case TenseFormationType.GOZASHTEH_SADEH:
                lstInflections = GetGozashtehSadehInflections(inflection);
                break;

            case TenseFormationType.HAAL_ELTEZAMI:
                lstInflections = GetHaalEltezamiInflections(inflection);
                break;

            case TenseFormationType.HAAL_SAADEH:
                lstInflections = GetHaalSaadehInflections(inflection);
                break;

            case TenseFormationType.HAAL_SAADEH_EKHBARI:
                lstInflections = GetHaalSaadehEkhbaariInflections(inflection);
                break;

            case TenseFormationType.PAYEH_MAFOOLI:
                lstInflections = GetPayehFelInflections(inflection);
                break;
            }
            return(lstInflections);
        }
 public MostamarSaz(VerbInflection inflec, int head, string type)
 {
     Type       = type;
     Inflection = inflec;
     Head       = head;
 }
 private static List<string> GetHaalSaadehEkhbaariInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbStem.Pishvand);
     if (inflection.VerbStem.HastehMozareh == "است")
     {
         verbBuilder.Append(inflection.VerbStem.HastehMozareh);
         lstInflections.Add(verbBuilder.ToString());
         return lstInflections;
     }
     if (inflection.VerbStem.HastehMozareh == "هست")
     {
         switch (inflection.Positivity)
         {
             case TensePositivity.POSITIVE:
                 verbBuilder.Append(inflection.VerbStem.HastehMozareh);
                 break;
             case TensePositivity.NEGATIVE:
                 verbBuilder.Append("نیست");
                 break;
         }
     }
     else
     {
         switch (inflection.Positivity)
         {
             case TensePositivity.POSITIVE:
                 verbBuilder.Append("می‌" + inflection.VerbStem.HastehMozareh);
                 break;
             case TensePositivity.NEGATIVE:
                 verbBuilder.Append("نمی‌" + inflection.VerbStem.HastehMozareh);
                 break;
         }
     }
     if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
     {
         if (inflection.VerbStem.HastehMozareh.Length > 1)
         {
             verbBuilder.Remove(verbBuilder.Length - 1, 1);
             verbBuilder.Append("ای");
         }
         else
             verbBuilder.Append("ی");
     }
     else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
     {
         verbBuilder.Append("ی");
     }
     switch (inflection.Shakhs)
     {
         case ShakhsType.AVALSHAKHS_JAM:
             verbBuilder.Append("یم");
             break;
         case ShakhsType.AVALSHAKHS_MOFRAD:
             verbBuilder.Append("م");
             break;
         case ShakhsType.DOVVOMSHAKHS_JAM:
             verbBuilder.Append("ید");
             break;
         case ShakhsType.DOVVOMSHAKHS_MOFRAD:
             verbBuilder.Append("ی");
             break;
         case ShakhsType.SEVVOMSHAKHS_JAM:
             verbBuilder.Append("ند");
             break;
         case ShakhsType.SEVVOMSHAKHS_MOFRAD:
             if (inflection.VerbStem.HastehMozareh != "باید" && inflection.VerbStem.HastehMozareh != "هست")
                 verbBuilder.Append("د");
             break;
     }
     lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
 private static string AddZamirPeyvasteh(string verb, VerbInflection inflection)
 {
     string inflectedVerb = verb;
     switch (inflection.ZamirPeyvasteh)
     {
         case ZamirPeyvastehType.SEVVOMSHAKHS_MOFRAD:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یش";
                 inflectedVerb += "یش";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.ZamirPeyvastehString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.ZamirPeyvastehString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "ش";
                 inflectedVerb += "ش";
             }
             break;
         case ZamirPeyvastehType.SEVVOMSHAKHS_JAM:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یشان";
                 inflectedVerb += "یشان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌شان";
                 inflectedVerb += "‌شان";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "شان";
                 inflectedVerb += "شان";
             }
             break;
         case ZamirPeyvastehType.DOVVOMSHAKHS_JAM:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یتان";
                 inflectedVerb += "یتان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌تان";
                 inflectedVerb += "‌تان";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "تان";
                 inflectedVerb += "تان";
             } break;
         case ZamirPeyvastehType.DOVVOMSHAKHS_MOFRAD:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یت";
                 inflectedVerb += "یت";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.ZamirPeyvastehString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.ZamirPeyvastehString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "ت";
                 inflectedVerb += "ت";
             }
             break;
         case ZamirPeyvastehType.AVALSHAKHS_JAM:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یمان";
                 inflectedVerb += "یمان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌مان";
                 inflectedVerb += "‌مان";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "مان";
                 inflectedVerb += "مان";
             }
             break;
         case ZamirPeyvastehType.AVALSHAKHS_MOFRAD:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.ZamirPeyvastehString = "یم";
                 inflectedVerb += "یم";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.ZamirPeyvastehString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.ZamirPeyvastehString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.ZamirPeyvastehString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else
             {
                 inflection.ZamirPeyvastehString = "م";
                 inflectedVerb += "م";
             }
             break;
     }
     return inflectedVerb;
 }
 private static List<string> GetGozashtehNaghliSadehInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbInflection = new VerbInflection(inflection.VerbStem, ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                             ShakhsType.Shakhs_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                             inflection.Positivity);
     var tempLst = GetPayehFelInflections(verbInflection);
     string fel = tempLst[0];
     switch (inflection.Shakhs)
     {
         case ShakhsType.SEVVOMSHAKHS_JAM:
             fel += "‌اند";
             break;
         case ShakhsType.DOVVOMSHAKHS_MOFRAD:
             fel += "‌ای";
             break;
         case ShakhsType.DOVVOMSHAKHS_JAM:
             fel += "‌اید";
             break;
         case ShakhsType.AVALSHAKHS_MOFRAD:
             fel += "‌ام";
             break;
         case ShakhsType.AVALSHAKHS_JAM:
             fel += "‌ایم";
             break;
     }
     lstInflections.Add(AddZamirPeyvasteh(fel, inflection));
     return lstInflections;
 }
 private static List<string> GetGozashtehEstemrariInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbStem.Pishvand);
     switch (inflection.Positivity)
     {
         case TensePositivity.POSITIVE:
             verbBuilder.Append("می‌" + inflection.VerbStem.HastehMazi);
             break;
         case TensePositivity.NEGATIVE:
             verbBuilder.Append("نمی‌" + inflection.VerbStem.HastehMazi);
             break;
     }
     if (inflection.VerbStem.HastehMazi.EndsWith("آ"))
     {
         verbBuilder.Remove(verbBuilder.Length - 1, 1);
         verbBuilder.Append("ی");
     }
     else if (inflection.VerbStem.HastehMazi.EndsWith("ا") || inflection.VerbStem.HastehMazi.EndsWith("و"))
     {
         verbBuilder.Append("ی");
     }
     switch (inflection.Shakhs)
     {
         case ShakhsType.AVALSHAKHS_JAM:
             verbBuilder.Append("یم");
             break;
         case ShakhsType.AVALSHAKHS_MOFRAD:
             verbBuilder.Append("م");
             break;
         case ShakhsType.DOVVOMSHAKHS_JAM:
             verbBuilder.Append("ید");
             break;
         case ShakhsType.DOVVOMSHAKHS_MOFRAD:
             verbBuilder.Append("ی");
             break;
         case ShakhsType.SEVVOMSHAKHS_JAM:
             verbBuilder.Append("ند");
             break;
     }
     lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
        private static List<string> GetPayehFelInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            switch (inflection.Positivity)
            {
                case TensePositivity.POSITIVE:
                    lstInflections.Add(inflection.VerbRoot.Prefix+ inflection.VerbRoot.PastTenseRoot + "ه");
                    break;
                case TensePositivity.NEGATIVE:
                    if (inflection.VerbRoot.PastRootVowelStart == "A" && inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        var verbBuilder = new StringBuilder();
                        verbBuilder.Append(inflection.VerbRoot.Prefix + "ن");
                        if (!inflection.VerbRoot.PastTenseRoot.StartsWith("آ"))
                            verbBuilder.Append("ی");
                        else
                            verbBuilder.Append("یا");
                        verbBuilder.Append(inflection.VerbRoot.PastTenseRoot.Remove(0, 1));
                        verbBuilder.Append("ه");
                        lstInflections.Add(verbBuilder.ToString());

                    }
                    else
                    {
                        lstInflections.Add(inflection.VerbRoot.Prefix + "ن" + inflection.VerbRoot.PastTenseRoot + "ه");
                    }
                    break;
            }
            return lstInflections;
        }
        public static Dictionary<int, KeyValuePair<string, VerbInflection>> GetVerbTokens(string[] sentence, string[] posTokens, out string[] newPosTokens, string[] lemmas, out string[] outLemmas, string verbDicPath)
        {
            var outputResults = new Dictionary<int, KeyValuePair<string, VerbInflection>>();
            var output = GetOutputResult(sentence, posTokens, out newPosTokens, lemmas, out outLemmas, verbDicPath);
            for (int i = 0; i < output.Count; i++)
            {
                var values = output[i];
                VerbInflection inflection;
                TensePassivity passivity;
                TensePositivity positivity;
                Verb verb;
                ShakhsType shakhsType;
                TenseFormationType tenseFormationType;
                ZamirPeyvastehType zamirPeyvastehType;
                string zamirString;
                List<VerbInflection> tempInfleclist;
                VerbInflection tempInflec;
                string[] tokens = output[i].Key.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                switch (values.Value)
                {
                    #region 10

                    case 10:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                       positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 14

                    case 14:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 15

                    case 15:
                        tenseFormationType = TenseFormationType.AMR;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.AMR)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 17

                    case 17:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 18

                    case 18:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 20

                    case 20:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 21

                    case 21:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        shakhsType = tempInflec.Shakhs;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 11

                    case 11:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 16

                    case 16:
                        tenseFormationType = TenseFormationType.AMR;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.AMR)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 12

                    case 12:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 13

                    case 13:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 19

                    case 19:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 22

                    case 22:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 23

                    case 23:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 24

                    case 24:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 25

                    case 25:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 26

                    case 26:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 27

                    case 27:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();

                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        if (tokens.Length == 2)
                        {
                            if (tokens[1] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 28

                    case 28:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 29

                    case 29:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 30

                    case 30:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 31

                    case 31:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        verb = new Verb("", tempInflec.VerbStem.HastehMazi, tempInflec.VerbStem.HastehMozareh,
                                        tempInflec.VerbStem.Pishvand, "", VerbTransitivity.GOZARA,
                                        tempInflec.VerbStem.Type, true,
                                        tempInflec.VerbStem.HastehMozarehConsonantVowelEndStem,
                                        tempInflec.VerbStem.HastehMaziVowelStart,
                                        tempInflec.VerbStem.HastehMozarehVowelStart);
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.IsPayehFelMasdari())
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb.HastehMazi = tempInflec.VerbStem.HastehMazi;
                        verb.HastehMozareh = tempInflec.VerbStem.HastehMozareh;
                        verb.Transitivity = tempInflec.VerbStem.Transitivity;
                        verb.AmrShodani = tempInflec.VerbStem.AmrShodani;
                        verb.HastehMozarehConsonantVowelEndStem = tempInflec.VerbStem.HastehMozarehConsonantVowelEndStem;
                        verb.HastehMaziVowelStart = tempInflec.VerbStem.HastehMaziVowelStart;
                        verb.HastehMozarehVowelStart = tempInflec.VerbStem.HastehMozarehVowelStart;
                        if (zamirPeyvastehType == ZamirPeyvastehType.ZamirPeyvasteh_NONE)
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 32

                    case 32:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        verb = new Verb("", tempInflec.VerbStem.HastehMazi, tempInflec.VerbStem.HastehMozareh,
                                        tempInflec.VerbStem.Pishvand, "", VerbTransitivity.GOZARA,
                                        tempInflec.VerbStem.Type, true,
                                        tempInflec.VerbStem.HastehMozarehConsonantVowelEndStem,
                                        tempInflec.VerbStem.HastehMaziVowelStart,
                                        tempInflec.VerbStem.HastehMozarehVowelStart);
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.IsPayehFelMasdari())
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb.HastehMazi = "کرد";
                        verb.HastehMozareh = "کن";
                        verb.Transitivity = VerbTransitivity.GOZARA;
                        verb.AmrShodani = tempInflec.VerbStem.AmrShodani;
                        verb.HastehMozarehConsonantVowelEndStem = tempInflec.VerbStem.HastehMozarehConsonantVowelEndStem;
                        verb.HastehMaziVowelStart = tempInflec.VerbStem.HastehMaziVowelStart;
                        verb.HastehMozarehVowelStart = tempInflec.VerbStem.HastehMozarehVowelStart;
                        if (zamirPeyvastehType == ZamirPeyvastehType.ZamirPeyvasteh_NONE)
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 34

                    case 34:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 38,39

                    case 38:
                    case 39:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 41

                    case 41:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        positivity = tempInflec.Positivity;
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 42

                    case 42:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        positivity = tempInflec.Positivity;
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 33

                    case 33:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        if (shakhsType == ShakhsType.Shakhs_NONE)
                            shakhsType = tempInflec.Shakhs;

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 35

                    case 35:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        if (tokens.Length == 3)
                        {
                            if (tokens[2] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = ZamirPeyvastehType.ZamirPeyvasteh_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 36

                    case 36:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = TensePositivity.POSITIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 37

                    case 37:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = TensePositivity.POSITIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 40

                    case 40:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        if (tokens.Length == 3)
                        {
                            if (tokens[2] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = ZamirPeyvastehType.ZamirPeyvasteh_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 43

                    case 43:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = TensePositivity.NEGATIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 44

                    case 44:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Shakhs;
                        positivity = TensePositivity.NEGATIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 45
                    case 45:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");

                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;
                    #endregion

                    #region 46

                    case 46:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 47

                    case 47:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 48

                    case 48:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 49

                    case 49:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 50

                    case 50:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Shakhs;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 51

                    case 51:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ABAD;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;

                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }

                        shakhsType = tempInflec.Shakhs;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 52

                    case 52:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ABAD;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbStem.Clone();
                        positivity = tempInflec.Positivity;

                        shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;

                        zamirPeyvastehType = ZamirPeyvastehType.ZamirPeyvasteh_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region default
                    default:
                        VerbInflection nullinflec = null;
                        if (i == output.Count - 1 && output[i].Value == 1)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 5)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 4)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 7)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();

                            tempInfleclist = VerbList.VerbShapes[tokens[1]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.VerbStem.HastehMazi == "شد")
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 6)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 9)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbStem.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.ZamirPeyvastehString;
                            verb = new Verb(verb.HarfeEzafeh, "کرد", "کن", verb.Pishvand, verb.Felyar, VerbTransitivity.GOZARA, verb.Type, true, "?", "@", "!");

                            shakhsType = ShakhsType.SEVVOMSHAKHS_MOFRAD;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else
                        {
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, nullinflec));
                        }
                        break;
                    #endregion
                }
            }
            return outputResults;
        }
示例#17
0
        private static string AddZamirPeyvasteh(string verb, VerbInflection inflection)
        {
            string inflectedVerb = verb;

            switch (inflection.ZamirPeyvasteh)
            {
            case ZamirPeyvastehType.SEVVOMSHAKHS_MOFRAD:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یش";
                    inflectedVerb += "یش";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.ZamirPeyvastehString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.ZamirPeyvastehString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "ش";
                    inflectedVerb += "ش";
                }
                break;

            case ZamirPeyvastehType.SEVVOMSHAKHS_JAM:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یشان";
                    inflectedVerb += "یشان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌شان";
                    inflectedVerb += "‌شان";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "شان";
                    inflectedVerb += "شان";
                }
                break;

            case ZamirPeyvastehType.DOVVOMSHAKHS_JAM:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یتان";
                    inflectedVerb += "یتان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌تان";
                    inflectedVerb += "‌تان";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "تان";
                    inflectedVerb += "تان";
                } break;

            case ZamirPeyvastehType.DOVVOMSHAKHS_MOFRAD:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یت";
                    inflectedVerb += "یت";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.ZamirPeyvastehString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.ZamirPeyvastehString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "ت";
                    inflectedVerb += "ت";
                }
                break;

            case ZamirPeyvastehType.AVALSHAKHS_JAM:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یمان";
                    inflectedVerb += "یمان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌مان";
                    inflectedVerb += "‌مان";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "مان";
                    inflectedVerb += "مان";
                }
                break;

            case ZamirPeyvastehType.AVALSHAKHS_MOFRAD:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.ZamirPeyvastehString = "یم";
                    inflectedVerb += "یم";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.ZamirPeyvastehString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.ZamirPeyvastehString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.ZamirPeyvastehString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else
                {
                    inflection.ZamirPeyvastehString = "م";
                    inflectedVerb += "م";
                }
                break;
            }
            return(inflectedVerb);
        }
示例#18
0
        private static List <string> GetHaalEltezamiInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();
            var verbBuilder2   = new StringBuilder();

            verbBuilder.Append(inflection.VerbStem.Pishvand);
            verbBuilder2.Append(inflection.VerbStem.Pishvand);

            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                if (!(inflection.VerbStem.HastehMozareh == "باشد" || inflection.VerbStem.HastehMozareh == "باید"))
                {
                    verbBuilder.Append("ب");
                }
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("ن");
                break;
            }
            if (inflection.VerbStem.HastehMozarehVowelStart == "A")
            {
                if (inflection.VerbStem.HastehMozareh.StartsWith("آ"))
                {
                    verbBuilder.Append("یا");
                    verbBuilder.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
            }
            else
            {
                verbBuilder.Append(inflection.VerbStem.HastehMozareh);
                verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
            }

            if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
            {
                if (verbBuilder.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                    if (inflection.VerbStem.HastehMozareh.Length > 1)
                    {
                        verbBuilder2.Remove(verbBuilder2.Length - 1, 1);
                        verbBuilder2.Append("ای");
                    }
                    else
                    {
                        verbBuilder2.Append("ی");
                    }
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
            {
                if (inflection.VerbStem.HastehMazi != "رفت" && inflection.VerbStem.HastehMazi != "شد")
                {
                    verbBuilder.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            switch (inflection.Shakhs)
            {
            case ShakhsType.AVALSHAKHS_JAM:
                verbBuilder.Append("یم");
                verbBuilder2.Append("یم");
                break;

            case ShakhsType.AVALSHAKHS_MOFRAD:
                verbBuilder.Append("م");
                verbBuilder2.Append("م");
                break;

            case ShakhsType.DOVVOMSHAKHS_JAM:
                verbBuilder.Append("ید");
                verbBuilder2.Append("ید");
                break;

            case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                verbBuilder.Append("ی");
                verbBuilder2.Append("ی");
                break;

            case ShakhsType.SEVVOMSHAKHS_JAM:
                verbBuilder.Append("ند");
                verbBuilder2.Append("ند");
                break;

            case ShakhsType.SEVVOMSHAKHS_MOFRAD:
                verbBuilder.Append("د");
                verbBuilder2.Append("د");
                break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbStem.HastehMozareh.Length > 2 || inflection.VerbStem.Type == VerbType.PISHVANDI))
            {
                lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.ToString(), inflection));
            }
            return(lstInflections);
        }
 private static List<string> GetGozashtehEstemrariInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbRoot.Prefix);
     switch (inflection.Positivity)
     {
         case TensePositivity.POSITIVE:
             verbBuilder.Append("می‌" + inflection.VerbRoot.PastTenseRoot);
             break;
         case TensePositivity.NEGATIVE:
             verbBuilder.Append("نمی‌" + inflection.VerbRoot.PastTenseRoot);
             break;
     }
     if (inflection.VerbRoot.PastTenseRoot.EndsWith("آ"))
     {
         verbBuilder.Remove(verbBuilder.Length - 1, 1);
         verbBuilder.Append("ی");
     }
     else if (inflection.VerbRoot.PastTenseRoot.EndsWith("ا") || inflection.VerbRoot.PastTenseRoot.EndsWith("و"))
     {
         verbBuilder.Append("ی");
     }
     switch (inflection.Person)
     {
         case PersonType.FIRST_PERSON_PLURAL:
             verbBuilder.Append("یم");
             break;
         case PersonType.FIRST_PERSON_SINGULAR:
             verbBuilder.Append("م");
             break;
         case PersonType.SECOND_PERSON_PLURAL:
             verbBuilder.Append("ید");
             break;
         case PersonType.SECOND_PERSON_SINGULAR:
             verbBuilder.Append("ی");
             break;
         case PersonType.THIRD_PERSON_PLURAL:
             verbBuilder.Append("ند");
             break;
     }
     lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
        private static List <string> GetGozashtehSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbRoot.Prefix);
            if (inflection.Positivity == TensePositivity.NEGATIVE)
            {
                verbBuilder.Append("ن");
            }

            if (inflection.VerbRoot.PastRootVowelStart == "A" && inflection.Positivity == TensePositivity.NEGATIVE)
            {
                if (!inflection.VerbRoot.PastTenseRoot.StartsWith("آ"))
                {
                    verbBuilder.Append("ی");
                }
                else
                {
                    verbBuilder.Append("یا");
                }
                verbBuilder.Append(inflection.VerbRoot.PastTenseRoot.Remove(0, 1));
            }

            else
            {
                verbBuilder.Append(inflection.VerbRoot.PastTenseRoot);
            }

            if (inflection.VerbRoot.PastTenseRoot.EndsWith("آ"))
            {
                verbBuilder.Remove(verbBuilder.Length - 1, 1);
                verbBuilder.Append("ی");
            }
            else if (inflection.VerbRoot.PastTenseRoot.EndsWith("ا") || inflection.VerbRoot.PastTenseRoot.EndsWith("و"))
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Person)
            {
            case PersonType.FIRST_PERSON_PLURAL:
                verbBuilder.Append("یم");
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                verbBuilder.Append("م");
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                verbBuilder.Append("ید");
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                verbBuilder.Append("ی");
                break;

            case PersonType.THIRD_PERSON_PLURAL:
                verbBuilder.Append("ند");
                break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
示例#21
0
        private static List <string> GetAmrInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder1   = new StringBuilder();
            var verbBuilder2   = new StringBuilder();
            var verbBuilder3   = new StringBuilder();

            if (inflection.VerbStem.Pishvand != "")
            {
                verbBuilder1.Append(inflection.VerbStem.Pishvand);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbStem.Pishvand);
                }
                if (inflection.Positivity == TensePositivity.POSITIVE)
                {
                    verbBuilder2.Append(inflection.VerbStem.Pishvand);
                }
            }
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                if (!(inflection.VerbStem.HastehMozareh == "باش" || inflection.VerbStem.HastehMozareh == "باید"))
                {
                    verbBuilder1.Append("ب");
                }
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder1.Append("ن");
                verbBuilder3.Append("م");
                break;
            }
            if (inflection.VerbStem.HastehMozarehVowelStart == "A")
            {
                if (inflection.VerbStem.HastehMozareh.StartsWith("آ"))
                {
                    verbBuilder1.Append("یا");
                    verbBuilder1.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یا");
                        verbBuilder3.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                    }
                }
                else
                {
                    verbBuilder1.Append("ی");
                    verbBuilder1.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ی");
                        verbBuilder3.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                    }
                }
            }
            else
            {
                verbBuilder1.Append(inflection.VerbStem.HastehMozareh);
                if (inflection.Positivity == TensePositivity.POSITIVE /* && inflection.VerbStem.Type==VerbType.PISHVANDI*/)
                {
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbStem.HastehMozareh);
                }
            }

            switch (inflection.Shakhs)
            {
            case ShakhsType.DOVVOMSHAKHS_JAM:
                if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    verbBuilder1.Append("یید");
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یید");
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                    {
                        verbBuilder2.Append("یید");
                    }
                }
                else
                {
                    verbBuilder1.Append("ید");
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ید");
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                    {
                        verbBuilder2.Append("ید");
                    }
                }
                break;
            }
            if (inflection.ZamirPeyvasteh == ZamirPeyvastehType.ZamirPeyvasteh_NONE)
            {
                if (!(inflection.VerbStem.HastehMozareh == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                {
                    lstInflections.Add(verbBuilder1.ToString());
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    lstInflections.Add(verbBuilder3.ToString());
                }
                if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                {
                    lstInflections.Add(verbBuilder2.ToString());
                }
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Shakhs == ShakhsType.DOVVOMSHAKHS_MOFRAD && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(verbBuilder2.Append("ی").ToString());
                }
            }
            else
            {
                if (!(inflection.VerbStem.HastehMozareh == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                {
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder1.ToString(), inflection));
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder3.ToString(), inflection));
                }
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Positivity == TensePositivity.POSITIVE)
                {
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.ToString(), inflection));
                }
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Shakhs == ShakhsType.DOVVOMSHAKHS_MOFRAD && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.Append("ی").ToString(), inflection));
                }
            }
            return(lstInflections);
        }
        private static List <string> GetHaalSaadehEkhbaariInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbRoot.Prefix);
            if (inflection.VerbRoot.PresentTenseRoot == "است")
            {
                verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
                lstInflections.Add(verbBuilder.ToString());
                return(lstInflections);
            }
            if (inflection.VerbRoot.PresentTenseRoot == "هست")
            {
                switch (inflection.Positivity)
                {
                case TensePositivity.POSITIVE:
                    verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
                    break;

                case TensePositivity.NEGATIVE:
                    verbBuilder.Append("نیست");
                    break;
                }
            }
            else
            {
                switch (inflection.Positivity)
                {
                case TensePositivity.POSITIVE:
                    verbBuilder.Append("می‌" + inflection.VerbRoot.PresentTenseRoot);
                    break;

                case TensePositivity.NEGATIVE:
                    verbBuilder.Append("نمی‌" + inflection.VerbRoot.PresentTenseRoot);
                    break;
                }
            }
            if (inflection.VerbRoot.PresentRootConsonantVowelEndStem == "A")
            {
                if (inflection.VerbRoot.PresentTenseRoot.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                }
                else
                {
                    verbBuilder.Append("ی");
                }
            }
            else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Person)
            {
            case PersonType.FIRST_PERSON_PLURAL:
                verbBuilder.Append("یم");
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                verbBuilder.Append("م");
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                verbBuilder.Append("ید");
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                verbBuilder.Append("ی");
                break;

            case PersonType.THIRD_PERSON_PLURAL:
                verbBuilder.Append("ند");
                break;

            case PersonType.THIRD_PERSON_SINGULAR:
                if (inflection.VerbRoot.PresentTenseRoot != "باید" && inflection.VerbRoot.PresentTenseRoot != "هست")
                {
                    verbBuilder.Append("د");
                }
                break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
示例#23
0
        public VerbList(string verbDicPath)
        {
            if (VerbShapes == null)
            {
                VerbPishvandiDic = new Dictionary <string, List <string> >();
                VerbShapes       = new Dictionary <string, List <VerbInflection> >();
                CompoundVerbDic  = new Dictionary <Verb, Dictionary <string, Dictionary <string, bool> > >();
                var      verbs   = new List <Verb>();
                string[] records = File.ReadAllText(verbDicPath).Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                foreach (var record in records)
                {
                    string[] fields = record.Split("\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                    int      vtype  = int.Parse(fields[0]);

                    if (vtype == 1 || vtype == 2)
                    {
                        var verbType = VerbType.SADEH;
                        if (vtype == 2)
                        {
                            verbType = VerbType.PISHVANDI;
                        }
                        int trans        = int.Parse(fields[1]);
                        var transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                        {
                            transitivity = VerbTransitivity.NAGOZAR;
                        }
                        else if (trans == 2)
                        {
                            transitivity = VerbTransitivity.DOVAJHI;
                        }
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        Verb verb;
                        bool amrShodani = true;
                        if (fields[7] == "*")
                        {
                            amrShodani = false;
                        }
                        string vowelEnd     = fields[8];
                        string maziVowel    = fields[9];
                        string mozarehVowel = fields[10];
                        if (fields[3] == "-")
                        {
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else if (fields[2] == "-")
                        {
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else
                        {
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }

                        verbs.Add(verb);
                        if (verb.Type == VerbType.PISHVANDI)
                        {
                            verbs.Add(new Verb("", "", "خواه", pishvand, "", VerbTransitivity.NAGOZAR,
                                               VerbType.AYANDEH_PISHVANDI, false, "?", "@", "!"));
                            if (VerbPishvandiDic.ContainsKey(pishvand))
                            {
                                VerbPishvandiDic[pishvand].Add(verb.HastehMazi + "|" + verb.HastehMozareh);
                            }
                            else
                            {
                                var lst = new List <string>();
                                lst.Add(verb.HastehMazi + "|" + verb.HastehMozareh);
                                VerbPishvandiDic.Add(pishvand, lst);
                            }
                        }
                    }
                    else if (vtype == 3)
                    {
                        var verbType = VerbType.SADEH;
                        int trans    = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                        {
                            transitivity = VerbTransitivity.NAGOZAR;
                        }
                        else if (trans == 2)
                        {
                            transitivity = VerbTransitivity.DOVAJHI;
                        }
                        Verb   verb;
                        bool   amrShodani       = true;
                        string vowelEnd         = fields[8];
                        string maziVowel        = fields[9];
                        string mozarehVowel     = fields[10];
                        string nonVerbalElemant = fields[4];
                        if (fields[3] == "-")
                        {
                            verb = new Verb("", fields[2], "", "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else if (fields[2] == "-")
                        {
                            verb = new Verb("", "", fields[3], "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else
                        {
                            verb = new Verb("", fields[2], fields[3], "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        if (fields[7] == "*")
                        {
                            amrShodani = false;
                        }
                        if (!CompoundVerbDic.ContainsKey(verb))
                        {
                            CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                        }
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                        {
                            CompoundVerbDic[verb][nonVerbalElemant].Add("", amrShodani);
                        }
                    }
                    else if (vtype == 4)
                    {
                        var verbType = VerbType.PISHVANDI;
                        int trans    = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                        {
                            transitivity = VerbTransitivity.NAGOZAR;
                        }
                        else if (trans == 2)
                        {
                            transitivity = VerbTransitivity.DOVAJHI;
                        }
                        Verb   verb;
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        bool   amrShodani       = true;
                        string vowelEnd         = fields[8];
                        string maziVowel        = fields[9];
                        string mozarehVowel     = fields[10];
                        string nonVerbalElemant = fields[4];
                        if (fields[3] == "-")
                        {
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else if (fields[2] == "-")
                        {
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else
                        {
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        if (fields[7] == "*")
                        {
                            amrShodani = false;
                        }
                        if (!CompoundVerbDic.ContainsKey(verb))
                        {
                            CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                        }
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                        {
                            CompoundVerbDic[verb][nonVerbalElemant].Add("", amrShodani);
                        }
                    }
                    else if (vtype == 5 || vtype == 7)
                    {
                        var verbType = VerbType.SADEH;
                        int trans    = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                        {
                            transitivity = VerbTransitivity.NAGOZAR;
                        }
                        else if (trans == 2)
                        {
                            transitivity = VerbTransitivity.DOVAJHI;
                        }
                        Verb   verb;
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        if (pishvand != "")
                        {
                            verbType = VerbType.PISHVANDI;
                        }
                        bool   amrShodani       = true;
                        string vowelEnd         = fields[8];
                        string maziVowel        = fields[9];
                        string mozarehVowel     = fields[10];
                        string nonVerbalElemant = fields[4];
                        string harfeEazafeh     = fields[6];
                        if (fields[3] == "-")
                        {
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else if (fields[2] == "-")
                        {
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        else
                        {
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        }
                        if (fields[7] == "*")
                        {
                            amrShodani = false;
                        }
                        if (!CompoundVerbDic.ContainsKey(verb))
                        {
                            CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                        }
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(harfeEazafeh))
                        {
                            CompoundVerbDic[verb][nonVerbalElemant].Add(harfeEazafeh, amrShodani);
                        }
                    }
                }
                var verbtext          = new StringBuilder();
                var mitavanInflection = new VerbInflection(new Verb("", "", "می‌توان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                           ShakhsType.Shakhs_NONE,
                                                           TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
                VerbShapes.Add("می‌توان", new List <VerbInflection>());
                VerbShapes["می‌توان"].Add(mitavanInflection);
                var nemitavanInflection = new VerbInflection(new Verb("", "", "می‌توان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                             ShakhsType.Shakhs_NONE,
                                                             TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
                VerbShapes.Add("نمی‌توان", new List <VerbInflection>());
                VerbShapes["نمی‌توان"].Add(nemitavanInflection);

                var betavanInflection = new VerbInflection(new Verb("", "", "بتوان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                           ShakhsType.Shakhs_NONE,
                                                           TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
                VerbShapes.Add("بتوان", new List <VerbInflection>());
                VerbShapes["بتوان"].Add(betavanInflection);

                var naitavanInflection = new VerbInflection(new Verb("", "", "نتوان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                            ShakhsType.Shakhs_NONE,
                                                            TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
                VerbShapes.Add("نتوان", new List <VerbInflection>());
                VerbShapes["نتوان"].Add(naitavanInflection);


                foreach (Verb verb in verbs)
                {
                    if (verb.Type == VerbType.SADEH || verb.Type == VerbType.PISHVANDI || verb.Type == VerbType.AYANDEH_PISHVANDI)
                    {
                        foreach (TensePositivity positivity in Enum.GetValues(typeof(TensePositivity)))
                        {
                            foreach (ShakhsType shakhsType in Enum.GetValues(typeof(ShakhsType)))
                            {
                                foreach (
                                    TenseFormationType tenseFormationType in
                                    Enum.GetValues(typeof(TenseFormationType)))
                                {
                                    foreach (
                                        ZamirPeyvastehType zamirPeyvastehType in
                                        Enum.GetValues(typeof(ZamirPeyvastehType)))
                                    {
                                        var inflection = new VerbInflection(verb, zamirPeyvastehType, "",
                                                                            shakhsType,
                                                                            tenseFormationType, positivity);
                                        if (inflection.IsValid())
                                        {
                                            var output = InflectorManager.GetInflections(inflection);
                                            foreach (string list in output)
                                            {
                                                if (!(VerbShapes.ContainsKey(list)))
                                                {
                                                    var verbInflections = new List <VerbInflection> {
                                                        inflection
                                                    };
                                                    VerbShapes.Add(list, verbInflections);
                                                }
                                                else
                                                {
                                                    bool contains = false;
                                                    foreach (VerbInflection inf in VerbShapes[list])
                                                    {
                                                        if (inflection.Equals(inf))
                                                        {
                                                            contains = true;
                                                            break;
                                                        }
                                                    }
                                                    if (!contains)
                                                    {
                                                        VerbShapes[list].Add(inflection);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        private static List <string> GetHaalEltezamiInflections(VerbInflection inflection)
        {
            var  lstInflections = new List <string>();
            var  verbBuilder    = new StringBuilder();
            var  verbBuilder2   = new StringBuilder();
            var  verbBuilder3   = new StringBuilder();
            bool thirdInflec    = false;

            verbBuilder.Append(inflection.VerbRoot.Prefix);
            verbBuilder2.Append(inflection.VerbRoot.Prefix);

            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                if (!(inflection.VerbRoot.PresentTenseRoot == "باشد" || inflection.VerbRoot.PresentTenseRoot == "باید"))
                {
                    verbBuilder.Append("ب");
                }
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder.Append("ن");
                break;
            }
            if (inflection.VerbRoot.PresentRootVowelStart == "A")
            {
                if (inflection.VerbRoot.PresentTenseRoot.StartsWith("آ"))
                {
                    verbBuilder.Append("یا");
                    verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                }
                else
                {
                    thirdInflec = true;
                    verbBuilder3.Append(verbBuilder.ToString());
                    verbBuilder.Append("ی");
                    verbBuilder3.Append("یا");

                    verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                }
            }
            else
            {
                verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
                verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
            }

            if (inflection.VerbRoot.PresentRootConsonantVowelEndStem == "A")
            {
                if (verbBuilder.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                    if (thirdInflec)
                    {
                        verbBuilder3.Remove(verbBuilder3.Length - 1, 1);
                        verbBuilder3.Append("ای");
                    }
                    if (inflection.VerbRoot.PresentTenseRoot.Length > 1)
                    {
                        verbBuilder2.Remove(verbBuilder2.Length - 1, 1);
                        verbBuilder2.Append("ای");
                    }
                    else
                    {
                        verbBuilder2.Append("ی");
                    }
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder3.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
            {
                if (inflection.VerbRoot.PastTenseRoot != "رفت" && inflection.VerbRoot.PastTenseRoot != "شد")
                {
                    verbBuilder.Append("ی");
                    verbBuilder3.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            switch (inflection.Person)
            {
            case PersonType.FIRST_PERSON_PLURAL:
                verbBuilder.Append("یم");
                verbBuilder3.Append("یم");
                verbBuilder2.Append("یم");
                break;

            case PersonType.FIRST_PERSON_SINGULAR:
                verbBuilder.Append("م");
                verbBuilder3.Append("م");
                verbBuilder2.Append("م");
                break;

            case PersonType.SECOND_PERSON_PLURAL:
                verbBuilder.Append("ید");
                verbBuilder3.Append("ید");
                verbBuilder2.Append("ید");
                break;

            case PersonType.SECOND_PERSON_SINGULAR:
                verbBuilder.Append("ی");
                verbBuilder3.Append("ی");
                verbBuilder2.Append("ی");
                break;

            case PersonType.THIRD_PERSON_PLURAL:
                verbBuilder.Append("ند");
                verbBuilder3.Append("ند");
                verbBuilder2.Append("ند");
                break;

            case PersonType.THIRD_PERSON_SINGULAR:
                verbBuilder.Append("د");
                verbBuilder3.Append("د");
                verbBuilder2.Append("د");
                break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            if (thirdInflec)
            {
                lstInflections.Add(AddAttachedPronoun(verbBuilder3.ToString(), inflection));
            }
            if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbRoot.PresentTenseRoot.Length >= 2 || inflection.VerbRoot.Type == VerbType.PISHVANDI))
            {
                lstInflections.Add(AddAttachedPronoun(verbBuilder2.ToString(), inflection));
            }
            return(lstInflections);
        }
 private static List<string> GetGozashtehNaghliEstemraiSadehInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbStem.Pishvand);
     switch (inflection.Positivity)
     {
         case TensePositivity.POSITIVE:
             verbBuilder.Append("می‌");
             break;
         case TensePositivity.NEGATIVE:
             verbBuilder.Append("نمی‌");
             break;
     }
     var verb = new Verb("", inflection.VerbStem.HastehMazi,
                          inflection.VerbStem.HastehMozareh, "",
                          "", inflection.VerbStem.Transitivity, VerbType.SADEH,
                          inflection.VerbStem.AmrShodani, inflection.VerbStem.HastehMozarehConsonantVowelEndStem, inflection.VerbStem.HastehMaziVowelStart, inflection.VerbStem.HastehMozarehVowelStart);
     var verbInflection = new VerbInflection(verb, ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                             ShakhsType.Shakhs_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                             TensePositivity.POSITIVE);
     var tempLst = GetPayehFelInflections(verbInflection);
     verbBuilder.Append(tempLst[0]);
     switch (inflection.Shakhs)
     {
         case ShakhsType.SEVVOMSHAKHS_JAM:
             verbBuilder.Append("‌اند");
             break;
         case ShakhsType.DOVVOMSHAKHS_MOFRAD:
             verbBuilder.Append("‌ای");
             break;
         case ShakhsType.DOVVOMSHAKHS_JAM:
             verbBuilder.Append("‌اید");
             break;
         case ShakhsType.AVALSHAKHS_MOFRAD:
             verbBuilder.Append("‌ام");
             break;
         case ShakhsType.AVALSHAKHS_JAM:
             verbBuilder.Append("‌ایم");
             break;
     }
     lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
        private static List <string> GetHaalSaadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();

            if (inflection.VerbRoot.PastTenseRoot == "خواست" || inflection.VerbRoot.PastTenseRoot == "خواست" || inflection.VerbRoot.PastTenseRoot == "داشت" || inflection.VerbRoot.PastTenseRoot == "بایست" || inflection.VerbRoot.Type == VerbType.AYANDEH_PISHVANDI)
            {
                var verbBuilder = new StringBuilder();
                verbBuilder.Append(inflection.VerbRoot.Prefix);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder.Append("ن");
                }
                verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);

                if (inflection.VerbRoot.PresentRootConsonantVowelEndStem == "A")
                {
                    if (verbBuilder.Length > 1)
                    {
                        verbBuilder.Remove(verbBuilder.Length - 1, 1);
                        verbBuilder.Append("ای");
                    }
                    else
                    {
                        verbBuilder.Append("ی");
                    }
                }
                else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    verbBuilder.Append("ی");
                }
                switch (inflection.Person)
                {
                case PersonType.FIRST_PERSON_PLURAL:
                    verbBuilder.Append("یم");
                    break;

                case PersonType.FIRST_PERSON_SINGULAR:
                    verbBuilder.Append("م");
                    break;

                case PersonType.SECOND_PERSON_PLURAL:
                    verbBuilder.Append("ید");
                    break;

                case PersonType.SECOND_PERSON_SINGULAR:
                    verbBuilder.Append("ی");
                    break;

                case PersonType.THIRD_PERSON_PLURAL:
                    verbBuilder.Append("ند");
                    break;

                case PersonType.THIRD_PERSON_SINGULAR:
                    if (inflection.VerbRoot.PastTenseRoot != "بایست")
                    {
                        verbBuilder.Append("د");
                    }
                    break;
                }
                lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            }
            return(lstInflections);
        }
        private static List<string> GetGozashtehSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            var verbBuilder = new StringBuilder();
            verbBuilder.Append(inflection.VerbStem.Pishvand);
            if (inflection.Positivity == TensePositivity.NEGATIVE)
            {
                verbBuilder.Append("ن");
            }

            if (inflection.VerbStem.HastehMaziVowelStart == "A" && inflection.Positivity == TensePositivity.NEGATIVE)
            {
                if (!inflection.VerbStem.HastehMazi.StartsWith("آ"))
                    verbBuilder.Append("ی");
                else
                    verbBuilder.Append("یا");
                verbBuilder.Append(inflection.VerbStem.HastehMazi.Remove(0, 1));
            }

            else
            {
                verbBuilder.Append(inflection.VerbStem.HastehMazi);
            }

            if (inflection.VerbStem.HastehMazi.EndsWith("آ"))
            {
                verbBuilder.Remove(verbBuilder.Length - 1, 1);
                verbBuilder.Append("ی");
            }
            else if (inflection.VerbStem.HastehMazi.EndsWith("ا") || inflection.VerbStem.HastehMazi.EndsWith("و"))
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Shakhs)
            {
                case ShakhsType.AVALSHAKHS_JAM:
                    verbBuilder.Append("یم");
                    break;
                case ShakhsType.AVALSHAKHS_MOFRAD:
                    verbBuilder.Append("م");
                    break;
                case ShakhsType.DOVVOMSHAKHS_JAM:
                    verbBuilder.Append("ید");
                    break;
                case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                    verbBuilder.Append("ی");
                    break;
                case ShakhsType.SEVVOMSHAKHS_JAM:
                    verbBuilder.Append("ند");
                    break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            return lstInflections;
        }
        private static List <string> GetAmrInflections(VerbInflection inflection)
        {
            var  lstInflections = new List <string>();
            var  verbBuilder1   = new StringBuilder();
            var  verbBuilder2   = new StringBuilder();
            var  verbBuilder3   = new StringBuilder();
            var  verbBuilder4   = new StringBuilder();
            bool fourthInflec   = false;

            if (inflection.VerbRoot.Prefix != "")
            {
                verbBuilder1.Append(inflection.VerbRoot.Prefix);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbRoot.Prefix);
                }
                if (inflection.Positivity == TensePositivity.POSITIVE)
                {
                    verbBuilder2.Append(inflection.VerbRoot.Prefix);
                }
            }
            switch (inflection.Positivity)
            {
            case TensePositivity.POSITIVE:
                if (!(inflection.VerbRoot.PresentTenseRoot == "باش" || inflection.VerbRoot.PresentTenseRoot == "باید"))
                {
                    verbBuilder1.Append("ب");
                }
                break;

            case TensePositivity.NEGATIVE:
                verbBuilder1.Append("ن");
                verbBuilder3.Append("م");
                break;
            }
            if (inflection.VerbRoot.PresentRootVowelStart == "A")
            {
                if (inflection.VerbRoot.PresentTenseRoot.StartsWith("آ"))
                {
                    verbBuilder1.Append("یا");
                    verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یا");
                        verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                }
                else
                {
                    fourthInflec = true;
                    verbBuilder4.Append(verbBuilder1.ToString());
                    verbBuilder1.Append("ی");
                    verbBuilder4.Append("یا");
                    verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    verbBuilder4.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ی");
                        verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                }
            }
            else
            {
                verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot);
                if (inflection.Positivity == TensePositivity.POSITIVE /* && inflection.VerbStem.Type==VerbType.PISHVANDI*/)
                {
                    verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot);
                }
            }

            switch (inflection.Person)
            {
            case PersonType.SECOND_PERSON_PLURAL:
                if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    verbBuilder1.Append("یید");
                    verbBuilder4.Append("یید");
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یید");
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbRoot.Type == VerbType.PISHVANDI)
                    {
                        verbBuilder2.Append("یید");
                    }
                }
                else
                {
                    verbBuilder1.Append("ید");
                    verbBuilder4.Append("ید");
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ید");
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbRoot.Type == VerbType.PISHVANDI)
                    {
                        verbBuilder2.Append("ید");
                    }
                }
                break;
            }
            if (inflection.ZamirPeyvasteh == AttachedPronounType.AttachedPronoun_NONE)
            {
                if (!(inflection.VerbRoot.PresentTenseRoot == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                {
                    lstInflections.Add(verbBuilder1.ToString());
                }
                if (fourthInflec)
                {
                    lstInflections.Add(verbBuilder4.ToString());
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    lstInflections.Add(verbBuilder3.ToString());
                }
                if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbRoot.Type == VerbType.PISHVANDI || inflection.VerbRoot.PastTenseRoot == "کرد" || inflection.VerbRoot.PastTenseRoot == "نمود" || inflection.VerbRoot.PastTenseRoot == "فرمود"))
                {
                    lstInflections.Add(verbBuilder2.ToString());
                }
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Person == PersonType.SECOND_PERSON_SINGULAR && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(verbBuilder2.Append("ی").ToString());
                }
            }
            else
            {
                if (!(inflection.VerbRoot.PresentTenseRoot == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder1.ToString(), inflection));
                }
                if (fourthInflec)
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder4.ToString(), inflection));
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder3.ToString(), inflection));
                }
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Positivity == TensePositivity.POSITIVE)
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder2.ToString(), inflection));
                }
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Person == PersonType.SECOND_PERSON_SINGULAR && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder2.Append("ی").ToString(), inflection));
                }
            }
            return(lstInflections);
        }
        private static List<string> GetHaalEltezamiInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            var verbBuilder = new StringBuilder();
            var verbBuilder2 = new StringBuilder();
            verbBuilder.Append(inflection.VerbStem.Pishvand);
            verbBuilder2.Append(inflection.VerbStem.Pishvand);

            switch (inflection.Positivity)
            {
                case TensePositivity.POSITIVE:
                    if (!(inflection.VerbStem.HastehMozareh == "باشد" || inflection.VerbStem.HastehMozareh == "باید"))
                        verbBuilder.Append("ب");
                    break;
                case TensePositivity.NEGATIVE:
                    verbBuilder.Append("ن");
                    break;
            }
            if (inflection.VerbStem.HastehMozarehVowelStart == "A")
            {
                if (inflection.VerbStem.HastehMozareh.StartsWith("آ"))
                {
                    verbBuilder.Append("یا");
                    verbBuilder.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
            }
            else
            {
                verbBuilder.Append(inflection.VerbStem.HastehMozareh);
                verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
            }

            if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
            {
                if (verbBuilder.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                    if (inflection.VerbStem.HastehMozareh.Length > 1)
                    {
                        verbBuilder2.Remove(verbBuilder2.Length - 1, 1);
                        verbBuilder2.Append("ای");
                    }
                    else
                    {
                        verbBuilder2.Append("ی");
                    }
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
            {
                if (inflection.VerbStem.HastehMazi != "رفت" && inflection.VerbStem.HastehMazi != "شد")
                {
                    verbBuilder.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            switch (inflection.Shakhs)
            {
                case ShakhsType.AVALSHAKHS_JAM:
                    verbBuilder.Append("یم");
                    verbBuilder2.Append("یم");
                    break;
                case ShakhsType.AVALSHAKHS_MOFRAD:
                    verbBuilder.Append("م");
                    verbBuilder2.Append("م");
                    break;
                case ShakhsType.DOVVOMSHAKHS_JAM:
                    verbBuilder.Append("ید");
                    verbBuilder2.Append("ید");
                    break;
                case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                    verbBuilder.Append("ی");
                    verbBuilder2.Append("ی");
                    break;
                case ShakhsType.SEVVOMSHAKHS_JAM:
                    verbBuilder.Append("ند");
                    verbBuilder2.Append("ند");
                    break;
                case ShakhsType.SEVVOMSHAKHS_MOFRAD:
                    verbBuilder.Append("د");
                    verbBuilder2.Append("د");
                    break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbStem.HastehMozareh.Length > 2 || inflection.VerbStem.Type == VerbType.PISHVANDI))
                lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.ToString(), inflection));
            return lstInflections;
        }
示例#30
0
        private static List <string> GetHaalSaadehEkhbaariInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();
            var verbBuilder    = new StringBuilder();

            verbBuilder.Append(inflection.VerbStem.Pishvand);
            if (inflection.VerbStem.HastehMozareh == "است")
            {
                verbBuilder.Append(inflection.VerbStem.HastehMozareh);
                lstInflections.Add(verbBuilder.ToString());
                return(lstInflections);
            }
            if (inflection.VerbStem.HastehMozareh == "هست")
            {
                switch (inflection.Positivity)
                {
                case TensePositivity.POSITIVE:
                    verbBuilder.Append(inflection.VerbStem.HastehMozareh);
                    break;

                case TensePositivity.NEGATIVE:
                    verbBuilder.Append("نیست");
                    break;
                }
            }
            else
            {
                switch (inflection.Positivity)
                {
                case TensePositivity.POSITIVE:
                    verbBuilder.Append("می‌" + inflection.VerbStem.HastehMozareh);
                    break;

                case TensePositivity.NEGATIVE:
                    verbBuilder.Append("نمی‌" + inflection.VerbStem.HastehMozareh);
                    break;
                }
            }
            if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
            {
                if (inflection.VerbStem.HastehMozareh.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                }
                else
                {
                    verbBuilder.Append("ی");
                }
            }
            else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
            {
                verbBuilder.Append("ی");
            }
            switch (inflection.Shakhs)
            {
            case ShakhsType.AVALSHAKHS_JAM:
                verbBuilder.Append("یم");
                break;

            case ShakhsType.AVALSHAKHS_MOFRAD:
                verbBuilder.Append("م");
                break;

            case ShakhsType.DOVVOMSHAKHS_JAM:
                verbBuilder.Append("ید");
                break;

            case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                verbBuilder.Append("ی");
                break;

            case ShakhsType.SEVVOMSHAKHS_JAM:
                verbBuilder.Append("ند");
                break;

            case ShakhsType.SEVVOMSHAKHS_MOFRAD:
                if (inflection.VerbStem.HastehMozareh != "باید" && inflection.VerbStem.HastehMozareh != "هست")
                {
                    verbBuilder.Append("د");
                }
                break;
            }
            lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            return(lstInflections);
        }
        private static List<string> GetHaalSaadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            if (inflection.VerbStem.HastehMazi == "خواست" || inflection.VerbStem.HastehMazi == "خواست" || inflection.VerbStem.HastehMazi == "داشت" || inflection.VerbStem.HastehMazi == "بایست" || inflection.VerbStem.Type == VerbType.AYANDEH_PISHVANDI)
            {
                var verbBuilder = new StringBuilder();
                verbBuilder.Append(inflection.VerbStem.Pishvand);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder.Append("ن");
                }
                verbBuilder.Append(inflection.VerbStem.HastehMozareh);

                if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
                {
                    if (verbBuilder.Length > 1)
                    {
                        verbBuilder.Remove(verbBuilder.Length - 1, 1);
                        verbBuilder.Append("ای");
                    }
                    else
                        verbBuilder.Append("ی");
                }
                else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    verbBuilder.Append("ی");
                }
                switch (inflection.Shakhs)
                {
                    case ShakhsType.AVALSHAKHS_JAM:
                        verbBuilder.Append("یم");
                        break;
                    case ShakhsType.AVALSHAKHS_MOFRAD:
                        verbBuilder.Append("م");
                        break;
                    case ShakhsType.DOVVOMSHAKHS_JAM:
                        verbBuilder.Append("ید");
                        break;
                    case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                        verbBuilder.Append("ی");
                        break;
                    case ShakhsType.SEVVOMSHAKHS_JAM:
                        verbBuilder.Append("ند");
                        break;
                    case ShakhsType.SEVVOMSHAKHS_MOFRAD:
                        if (inflection.VerbStem.HastehMazi != "بایست")
                            verbBuilder.Append("د");
                        break;
                }
                lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            }
            return lstInflections;
        }
 private static List<string> GetGozashtehNaghliSadehInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbInflection = new VerbInflection(inflection.VerbRoot, AttachedPronounType.AttachedPronoun_NONE,"",
                                             PersonType.PERSON_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                             inflection.Positivity);
     var tempLst = GetPayehFelInflections(verbInflection);
     string fel = tempLst[0];
     switch (inflection.Person)
     {
         case PersonType.THIRD_PERSON_PLURAL:
             fel += "‌اند";
             break;
         case PersonType.SECOND_PERSON_SINGULAR:
             fel += "‌ای";
             break;
         case PersonType.SECOND_PERSON_PLURAL:
             fel += "‌اید";
             break;
         case PersonType.FIRST_PERSON_SINGULAR:
             fel += "‌ام";
             break;
         case PersonType.FIRST_PERSON_PLURAL:
             fel += "‌ایم";
             break;
     }
     lstInflections.Add(AddAttachedPronoun(fel, inflection));
     return lstInflections;
 }
        /// <summary>
        /// Constructs all dictionaries used in the inflection program
        /// </summary>
        /// <param name="verbDicPath"></param>
        public VerbList(string verbDicPath)
        {
            VerbPishvandiDic = new Dictionary <string, List <string> >();
            VerbShapes       = new Dictionary <string, List <VerbInflection> >();
            CompoundVerbDic  = new Dictionary <Verb, Dictionary <string, Dictionary <string, bool> > >();
            var verbs = new List <Verb>();

            string[] records = File.ReadAllText(verbDicPath).Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            foreach (var record in records)
            {
                string[] fields = record.Split("\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                int      vtype  = int.Parse(fields[0]);

                if (vtype == 1 || vtype == 2)
                {
                    var verbType = VerbType.SADEH;
                    if (vtype == 2)
                    {
                        verbType = VerbType.PISHVANDI;
                    }
                    int trans        = int.Parse(fields[1]);
                    var transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                    {
                        transitivity = VerbTransitivity.InTransitive;
                    }
                    else if (trans == 2)
                    {
                        transitivity = VerbTransitivity.BiTransitive;
                    }
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    Verb verb;
                    bool amrShodani = true;
                    if (fields[7] == "*")
                    {
                        amrShodani = false;
                    }
                    string vowelEnd     = fields[8];
                    string maziVowel    = fields[9];
                    string mozarehVowel = fields[10];
                    if (fields[3] == "-")
                    {
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else if (fields[2] == "-")
                    {
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else
                    {
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }

                    verbs.Add(verb);
                    if (verb.Type == VerbType.PISHVANDI)
                    {
                        verbs.Add(new Verb("", "", "خواه", pishvand, "", VerbTransitivity.InTransitive,
                                           VerbType.AYANDEH_PISHVANDI, false, "?", "@", "!"));
                        if (VerbPishvandiDic.ContainsKey(pishvand))
                        {
                            VerbPishvandiDic[pishvand].Add(verb.PastTenseRoot + "|" + verb.PresentTenseRoot);
                        }
                        else
                        {
                            var lst = new List <string>();
                            lst.Add(verb.PastTenseRoot + "|" + verb.PresentTenseRoot);
                            VerbPishvandiDic.Add(pishvand, lst);
                        }
                    }
                }
                else if (vtype == 3)
                {
                    var verbType = VerbType.SADEH;
                    int trans    = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                    {
                        transitivity = VerbTransitivity.InTransitive;
                    }
                    else if (trans == 2)
                    {
                        transitivity = VerbTransitivity.BiTransitive;
                    }
                    Verb   verb;
                    bool   amrShodani       = true;
                    string vowelEnd         = fields[8];
                    string maziVowel        = fields[9];
                    string mozarehVowel     = fields[10];
                    string nonVerbalElemant = fields[4];
                    if (fields[3] == "-")
                    {
                        verb = new Verb("", fields[2], "", "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else if (fields[2] == "-")
                    {
                        verb = new Verb("", "", fields[3], "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else
                    {
                        verb = new Verb("", fields[2], fields[3], "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    if (fields[7] == "*")
                    {
                        amrShodani = false;
                    }
                    var istran = true;
                    if (transitivity == VerbTransitivity.InTransitive)
                    {
                        istran = false;
                    }

                    if (!CompoundVerbDic.ContainsKey(verb))
                    {
                        CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                    }
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                    {
                        CompoundVerbDic[verb][nonVerbalElemant].Add("", istran);
                    }
                }
                else if (vtype == 4)
                {
                    var verbType = VerbType.PISHVANDI;
                    int trans    = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                    {
                        transitivity = VerbTransitivity.InTransitive;
                    }
                    else if (trans == 2)
                    {
                        transitivity = VerbTransitivity.BiTransitive;
                    }
                    Verb   verb;
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    bool   amrShodani       = true;
                    string vowelEnd         = fields[8];
                    string maziVowel        = fields[9];
                    string mozarehVowel     = fields[10];
                    string nonVerbalElemant = fields[4];
                    if (fields[3] == "-")
                    {
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else if (fields[2] == "-")
                    {
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else
                    {
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    if (fields[7] == "*")
                    {
                        amrShodani = false;
                    }
                    var istrans = true;
                    if (transitivity == VerbTransitivity.InTransitive)
                    {
                        istrans = false;
                    }
                    if (!CompoundVerbDic.ContainsKey(verb))
                    {
                        CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                    }
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                    {
                        CompoundVerbDic[verb][nonVerbalElemant].Add("", istrans);
                    }
                }
                else if (vtype == 5 || vtype == 7)
                {
                    var verbType = VerbType.SADEH;
                    int trans    = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                    {
                        transitivity = VerbTransitivity.InTransitive;
                    }
                    else if (trans == 2)
                    {
                        transitivity = VerbTransitivity.BiTransitive;
                    }
                    Verb   verb;
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    if (pishvand != "")
                    {
                        verbType = VerbType.PISHVANDI;
                    }
                    bool   amrShodani       = true;
                    string vowelEnd         = fields[8];
                    string maziVowel        = fields[9];
                    string mozarehVowel     = fields[10];
                    string nonVerbalElemant = fields[4];
                    string harfeEazafeh     = fields[6];
                    if (fields[3] == "-")
                    {
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else if (fields[2] == "-")
                    {
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    else
                    {
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    }
                    if (fields[7] == "*")
                    {
                        amrShodani = false;
                    }
                    var istrans = true;
                    if (transitivity == VerbTransitivity.InTransitive)
                    {
                        istrans = false;
                    }
                    if (!CompoundVerbDic.ContainsKey(verb))
                    {
                        CompoundVerbDic.Add(verb, new Dictionary <string, Dictionary <string, bool> >());
                    }
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary <string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(harfeEazafeh))
                    {
                        CompoundVerbDic[verb][nonVerbalElemant].Add(harfeEazafeh, istrans);
                    }
                }
            }
            var verbtext          = new StringBuilder();
            var mitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                       PersonType.PERSON_NONE,
                                                       TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);

            VerbShapes.Add("می‌توان", new List <VerbInflection>());
            VerbShapes["می‌توان"].Add(mitavanInflection);
            var nemitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                         PersonType.PERSON_NONE,
                                                         TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);

            VerbShapes.Add("نمی‌توان", new List <VerbInflection>());
            VerbShapes["نمی‌توان"].Add(nemitavanInflection);

            VerbShapes.Add("میتوان", new List <VerbInflection>());
            VerbShapes["میتوان"].Add(mitavanInflection);
            VerbShapes.Add("نمیتوان", new List <VerbInflection>());
            VerbShapes["نمیتوان"].Add(nemitavanInflection);

            var betavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                       PersonType.PERSON_NONE,
                                                       TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);

            VerbShapes.Add("بتوان", new List <VerbInflection>());
            VerbShapes["بتوان"].Add(betavanInflection);

            var naitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                        PersonType.PERSON_NONE,
                                                        TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);

            VerbShapes.Add("نتوان", new List <VerbInflection>());
            VerbShapes["نتوان"].Add(naitavanInflection);


            foreach (Verb verb in verbs)
            {
                if (verb.Type == VerbType.SADEH || verb.Type == VerbType.PISHVANDI || verb.Type == VerbType.AYANDEH_PISHVANDI)
                {
                    foreach (TensePositivity positivity in Enum.GetValues(typeof(TensePositivity)))
                    {
                        foreach (PersonType shakhsType in Enum.GetValues(typeof(PersonType)))
                        {
                            foreach (
                                TenseFormationType tenseFormationType in
                                Enum.GetValues(typeof(TenseFormationType)))
                            {
                                foreach (
                                    AttachedPronounType zamirPeyvastehType in
                                    Enum.GetValues(typeof(AttachedPronounType)))
                                {
                                    var inflection = new VerbInflection(verb, zamirPeyvastehType, "",
                                                                        shakhsType,
                                                                        tenseFormationType, positivity);
                                    if (inflection.IsValid())
                                    {
                                        var output = InflectorAnalyzeSentencer.GetInflections(inflection);
                                        if (inflection.VerbRoot.PastTenseRoot == "بایست")
                                        {
                                            if (output[0].Contains("بایست"))
                                            {
                                                inflection.Person    = PersonType.PERSON_NONE;
                                                inflection.TenseForm = TenseFormationType.GOZASHTEH_SADEH;
                                            }
                                            else
                                            {
                                                inflection.Person    = PersonType.PERSON_NONE;
                                                inflection.TenseForm = TenseFormationType.HAAL_SAADEH;
                                            }
                                        }
                                        var output2 = new List <string>();
                                        foreach (string list in output)
                                        {
                                            output2.Add(list);
                                            //Console.WriteLine(list);
                                            if (list.Contains("می‌"))
                                            {
                                                var newshape = list.Replace("می‌", "می");
                                                output2.Add(newshape);
                                                //Console.WriteLine(newshape);
                                            }
                                        }
                                        foreach (string list in output2)
                                        {
                                            if (!(VerbShapes.ContainsKey(list)))
                                            {
                                                var verbInflections = new List <VerbInflection> {
                                                    inflection
                                                };
                                                VerbShapes.Add(list, verbInflections);
                                            }
                                            else
                                            {
                                                bool contains = false;
                                                foreach (VerbInflection inf in VerbShapes[list])
                                                {
                                                    if (inflection.Equals(inf))
                                                    {
                                                        contains = true;
                                                        break;
                                                    }
                                                }
                                                if (!contains)
                                                {
                                                    //This for zamir_peyvaste rule based disambiguation in which the inflections
                                                    //without zamir_peyvaste are rathered to remain
                                                    for (int i = 0; i < VerbShapes[list].Count; i++)
                                                    {
                                                        var verbInflection = VerbShapes[list][i];
                                                        if (verbInflection.ZamirPeyvasteh !=
                                                            AttachedPronounType.AttachedPronoun_NONE)
                                                        {
                                                            VerbShapes[list].Remove(verbInflection);
                                                        }
                                                    }
                                                    VerbShapes[list].Add(inflection);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        private static List<string> GetHaalEltezamiInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            var verbBuilder = new StringBuilder();
            var verbBuilder2 = new StringBuilder();
            var verbBuilder3 = new StringBuilder();
            bool thirdInflec = false;
            verbBuilder.Append(inflection.VerbRoot.Prefix);
            verbBuilder2.Append(inflection.VerbRoot.Prefix);

                switch (inflection.Positivity)
                {
                    case TensePositivity.POSITIVE:
                        if (!(inflection.VerbRoot.PresentTenseRoot == "باشد" || inflection.VerbRoot.PresentTenseRoot == "باید"))
                            verbBuilder.Append("ب");
                        break;
                    case TensePositivity.NEGATIVE:
                        verbBuilder.Append("ن");
                        break;
                }
                if (inflection.VerbRoot.PresentRootVowelStart=="A")
                {
                    if (inflection.VerbRoot.PresentTenseRoot.StartsWith("آ"))
                    {
                        verbBuilder.Append("یا");
                        verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                    else
                    {
                        thirdInflec = true;
                        verbBuilder3.Append(verbBuilder.ToString());
                        verbBuilder.Append("ی");
                        verbBuilder3.Append("یا");

                        verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                        verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                }
                else
                {
                    verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
                    verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                }

            if (inflection.VerbRoot.PresentRootConsonantVowelEndStem=="A")
            {
                if (verbBuilder.Length > 1)
                {
                    verbBuilder.Remove(verbBuilder.Length - 1, 1);
                    verbBuilder.Append("ای");
                    if (thirdInflec)
                    {
                        verbBuilder3.Remove(verbBuilder3.Length - 1, 1);
                        verbBuilder3.Append("ای");
                    }
                    if (inflection.VerbRoot.PresentTenseRoot.Length > 1)
                    {
                        verbBuilder2.Remove(verbBuilder2.Length - 1, 1);
                        verbBuilder2.Append("ای");
                    }
                    else
                    {
                        verbBuilder2.Append("ی");
                    }
                }
                else
                {
                    verbBuilder.Append("ی");
                    verbBuilder3.Append("ی");
                    verbBuilder2.Append("ی");
                }
            }
            else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
            {
                if (inflection.VerbRoot.PastTenseRoot != "رفت" && inflection.VerbRoot.PastTenseRoot != "شد")
                {
                   verbBuilder.Append("ی");
                   verbBuilder3.Append("ی");
                   verbBuilder2.Append("ی");
                }
            }
            switch (inflection.Person)
            {
                case PersonType.FIRST_PERSON_PLURAL:
                    verbBuilder.Append("یم");
                    verbBuilder3.Append("یم");
                    verbBuilder2.Append("یم");
                    break;
                case PersonType.FIRST_PERSON_SINGULAR:
                    verbBuilder.Append("م");
                    verbBuilder3.Append("م");
                    verbBuilder2.Append("م");
                    break;
                case PersonType.SECOND_PERSON_PLURAL:
                    verbBuilder.Append("ید");
             verbBuilder3.Append("ید");
             verbBuilder2.Append("ید");
                    break;
                case PersonType.SECOND_PERSON_SINGULAR:
                    verbBuilder.Append("ی");
                    verbBuilder3.Append("ی");
                    verbBuilder2.Append("ی");
                    break;
                case PersonType.THIRD_PERSON_PLURAL:
                    verbBuilder.Append("ند");
                    verbBuilder3.Append("ند");
                    verbBuilder2.Append("ند");
                    break;
                case PersonType.THIRD_PERSON_SINGULAR:
                    verbBuilder.Append("د");
                    verbBuilder3.Append("د");
                    verbBuilder2.Append("د");
                    break;
            }
            lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            if(thirdInflec)
            lstInflections.Add(AddAttachedPronoun(verbBuilder3.ToString(), inflection));
            if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbRoot.PresentTenseRoot.Length >= 2 || inflection.VerbRoot.Type == VerbType.PISHVANDI))
                lstInflections.Add(AddAttachedPronoun(verbBuilder2.ToString(), inflection));
            return lstInflections;
        }
        private static List<string> GetAmrInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            var verbBuilder1 = new StringBuilder();
            var verbBuilder2 = new StringBuilder();
            var verbBuilder3 = new StringBuilder();
            var verbBuilder4 = new StringBuilder();
            bool fourthInflec = false;
            if (inflection.VerbRoot.Prefix != "")
            {
                verbBuilder1.Append(inflection.VerbRoot.Prefix);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbRoot.Prefix);
                }
                if (inflection.Positivity == TensePositivity.POSITIVE)
                {
                    verbBuilder2.Append(inflection.VerbRoot.Prefix);
                }
            }
            switch (inflection.Positivity)
            {
                case TensePositivity.POSITIVE:
                    if (!(inflection.VerbRoot.PresentTenseRoot == "باش" || inflection.VerbRoot.PresentTenseRoot == "باید"))
                        verbBuilder1.Append("ب");
                    break;
                case TensePositivity.NEGATIVE:
                    verbBuilder1.Append("ن");
                    verbBuilder3.Append("م");
                    break;
            }
            if (inflection.VerbRoot.PresentRootVowelStart == "A")
            {
                if (inflection.VerbRoot.PresentTenseRoot.StartsWith("آ"))
                {
                    verbBuilder1.Append("یا");
                    verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یا");
                        verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                }
                else
                {
                    fourthInflec = true;
                    verbBuilder4.Append(verbBuilder1.ToString());
                    verbBuilder1.Append("ی");
                    verbBuilder4.Append("یا");
                    verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    verbBuilder4.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ی");
                        verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                    }
                }
            }
            else
            {
                verbBuilder1.Append(inflection.VerbRoot.PresentTenseRoot);
                if (inflection.Positivity == TensePositivity.POSITIVE/* && inflection.VerbStem.Type==VerbType.PISHVANDI*/)
                {
                    verbBuilder2.Append(inflection.VerbRoot.PresentTenseRoot);
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbRoot.PresentTenseRoot);
                }
            }

            switch (inflection.Person)
            {
                case PersonType.SECOND_PERSON_PLURAL:
                    if (inflection.VerbRoot.PresentRootConsonantVowelEndStem!="?")
                    {
                        verbBuilder1.Append("یید");
                        verbBuilder4.Append("یید");
                        if (inflection.Positivity == TensePositivity.NEGATIVE)
                        {
                            verbBuilder3.Append("یید");
                        }
                        if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbRoot.Type==VerbType.PISHVANDI)
                        {
                            verbBuilder2.Append("یید");
                        }
                    }
                    else
                    {
                        verbBuilder1.Append("ید");
                        verbBuilder4.Append("ید");
                        if (inflection.Positivity == TensePositivity.NEGATIVE)
                        {
                            verbBuilder3.Append("ید");
                        }
                        if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbRoot.Type == VerbType.PISHVANDI)
                        {
                            verbBuilder2.Append("ید");
                        }
                    }
                    break;
            }
            if (inflection.ZamirPeyvasteh == AttachedPronounType.AttachedPronoun_NONE)
            {
                if (!(inflection.VerbRoot.PresentTenseRoot == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                    lstInflections.Add(verbBuilder1.ToString());
                if(fourthInflec)
                    lstInflections.Add(verbBuilder4.ToString());
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                    lstInflections.Add(verbBuilder3.ToString());
                if (inflection.Positivity == TensePositivity.POSITIVE && (inflection.VerbRoot.Type == VerbType.PISHVANDI || inflection.VerbRoot.PastTenseRoot=="کرد"  || inflection.VerbRoot.PastTenseRoot=="نمود" || inflection.VerbRoot.PastTenseRoot=="فرمود"))
                    lstInflections.Add(verbBuilder2.ToString());
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Person == PersonType.SECOND_PERSON_SINGULAR && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(verbBuilder2.Append("ی").ToString());
                }
            }
            else
            {
                if (!(inflection.VerbRoot.PresentTenseRoot == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                    lstInflections.Add(AddAttachedPronoun(verbBuilder1.ToString(), inflection));
                if (fourthInflec)
                    lstInflections.Add(AddAttachedPronoun(verbBuilder4.ToString(), inflection));
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                    lstInflections.Add(AddAttachedPronoun(verbBuilder3.ToString(),inflection));
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Positivity == TensePositivity.POSITIVE)
                    lstInflections.Add(AddAttachedPronoun(verbBuilder2.ToString(), inflection));
                if (inflection.VerbRoot.Type == VerbType.PISHVANDI && inflection.Person==PersonType.SECOND_PERSON_SINGULAR && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(AddAttachedPronoun(verbBuilder2.Append("ی").ToString(), inflection));
                }
            }
            return lstInflections;
        }
 private static List<string> GetHaalSaadehEkhbaariInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbRoot.Prefix);
     if(inflection.VerbRoot.PresentTenseRoot == "است")
     {
         verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
         lstInflections.Add(verbBuilder.ToString());
         return lstInflections;
     }
     if (inflection.VerbRoot.PresentTenseRoot == "هست")
     {
         switch (inflection.Positivity)
         {
             case TensePositivity.POSITIVE:
                 verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);
                 break;
             case TensePositivity.NEGATIVE:
                     verbBuilder.Append("نیست");
                 break;
         }
     }
     else
     {
         switch (inflection.Positivity)
         {
             case TensePositivity.POSITIVE:
                 verbBuilder.Append("می‌" + inflection.VerbRoot.PresentTenseRoot);
                 break;
             case TensePositivity.NEGATIVE:
                 verbBuilder.Append("نمی‌" + inflection.VerbRoot.PresentTenseRoot);
                 break;
         }
     }
     if (inflection.VerbRoot.PresentRootConsonantVowelEndStem == "A")
     {
         if (inflection.VerbRoot.PresentTenseRoot.Length>1)
         {
             verbBuilder.Remove(verbBuilder.Length - 1, 1);
             verbBuilder.Append("ای");
         }
         else
             verbBuilder.Append("ی");
     }
     else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
     {
         verbBuilder.Append("ی");
     }
     switch (inflection.Person)
     {
         case PersonType.FIRST_PERSON_PLURAL:
             verbBuilder.Append("یم");
             break;
         case PersonType.FIRST_PERSON_SINGULAR:
             verbBuilder.Append("م");
             break;
         case PersonType.SECOND_PERSON_PLURAL:
             verbBuilder.Append("ید");
             break;
         case PersonType.SECOND_PERSON_SINGULAR:
             verbBuilder.Append("ی");
             break;
         case PersonType.THIRD_PERSON_PLURAL:
             verbBuilder.Append("ند");
             break;
         case PersonType.THIRD_PERSON_SINGULAR:
             if (inflection.VerbRoot.PresentTenseRoot != "باید" && inflection.VerbRoot.PresentTenseRoot != "هست")
             verbBuilder.Append("د");
             break;
     }
     lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
 private static List<string> GetGozashtehNaghliEstemraiSadehInflections(VerbInflection inflection)
 {
     var lstInflections = new List<string>();
     var verbBuilder = new StringBuilder();
     verbBuilder.Append(inflection.VerbRoot.Prefix);
     switch (inflection.Positivity)
     {
         case TensePositivity.POSITIVE:
             verbBuilder.Append("می‌" );
             break;
         case TensePositivity.NEGATIVE:
             verbBuilder.Append("نمی‌" );
             break;
     }
     var verb = new Verb("", inflection.VerbRoot.PastTenseRoot,
                          inflection.VerbRoot.PresentTenseRoot, "",
                          "", inflection.VerbRoot.Transitivity, VerbType.SADEH,
                          inflection.VerbRoot.CanBeImperative, inflection.VerbRoot.PresentRootConsonantVowelEndStem,inflection.VerbRoot.PastRootVowelStart,inflection.VerbRoot.PresentRootVowelStart);
     var verbInflection = new VerbInflection(verb, AttachedPronounType.AttachedPronoun_NONE,"",
                                             PersonType.PERSON_NONE, TenseFormationType.PAYEH_MAFOOLI,
                                             TensePositivity.POSITIVE);
     var tempLst = GetPayehFelInflections(verbInflection);
        verbBuilder.Append(tempLst[0]);
     switch (inflection.Person)
     {
         case PersonType.THIRD_PERSON_PLURAL:
              verbBuilder.Append( "‌اند");
             break;
         case PersonType.SECOND_PERSON_SINGULAR:
             verbBuilder.Append("‌ای");
             break;
         case PersonType.SECOND_PERSON_PLURAL:
              verbBuilder.Append( "‌اید");
             break;
         case PersonType.FIRST_PERSON_SINGULAR:
              verbBuilder.Append("‌ام");
             break;
         case PersonType.FIRST_PERSON_PLURAL:
              verbBuilder.Append( "‌ایم");
             break;
     }
     lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
     return lstInflections;
 }
示例#38
0
        private static List <string> GetHaalSaadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List <string>();

            if (inflection.VerbStem.HastehMazi == "خواست" || inflection.VerbStem.HastehMazi == "خواست" || inflection.VerbStem.HastehMazi == "داشت" || inflection.VerbStem.HastehMazi == "بایست" || inflection.VerbStem.Type == VerbType.AYANDEH_PISHVANDI)
            {
                var verbBuilder = new StringBuilder();
                verbBuilder.Append(inflection.VerbStem.Pishvand);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder.Append("ن");
                }
                verbBuilder.Append(inflection.VerbStem.HastehMozareh);

                if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem == "A")
                {
                    if (verbBuilder.Length > 1)
                    {
                        verbBuilder.Remove(verbBuilder.Length - 1, 1);
                        verbBuilder.Append("ای");
                    }
                    else
                    {
                        verbBuilder.Append("ی");
                    }
                }
                else if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    verbBuilder.Append("ی");
                }
                switch (inflection.Shakhs)
                {
                case ShakhsType.AVALSHAKHS_JAM:
                    verbBuilder.Append("یم");
                    break;

                case ShakhsType.AVALSHAKHS_MOFRAD:
                    verbBuilder.Append("م");
                    break;

                case ShakhsType.DOVVOMSHAKHS_JAM:
                    verbBuilder.Append("ید");
                    break;

                case ShakhsType.DOVVOMSHAKHS_MOFRAD:
                    verbBuilder.Append("ی");
                    break;

                case ShakhsType.SEVVOMSHAKHS_JAM:
                    verbBuilder.Append("ند");
                    break;

                case ShakhsType.SEVVOMSHAKHS_MOFRAD:
                    if (inflection.VerbStem.HastehMazi != "بایست")
                    {
                        verbBuilder.Append("د");
                    }
                    break;
                }
                lstInflections.Add(AddZamirPeyvasteh(verbBuilder.ToString(), inflection));
            }
            return(lstInflections);
        }
        private static List<string> GetGozashtehSadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
               var verbBuilder = new StringBuilder();
               verbBuilder.Append(inflection.VerbRoot.Prefix);
            if (inflection.Positivity == TensePositivity.NEGATIVE)
               {
                   verbBuilder.Append("ن");
               }

               if (inflection.VerbRoot.PastRootVowelStart=="A" && inflection.Positivity == TensePositivity.NEGATIVE)
               {
                   if (!inflection.VerbRoot.PastTenseRoot.StartsWith("آ"))
                   verbBuilder.Append("ی");
                   else
                   verbBuilder.Append("یا");
                       verbBuilder.Append(inflection.VerbRoot.PastTenseRoot.Remove(0, 1));
               }

               else
               {
                   verbBuilder.Append(inflection.VerbRoot.PastTenseRoot);
               }

               if (inflection.VerbRoot.PastTenseRoot.EndsWith("آ"))
               {
                   verbBuilder.Remove(verbBuilder.Length - 1, 1);
                   verbBuilder.Append("ی");
               }
               else if (inflection.VerbRoot.PastTenseRoot.EndsWith("ا") || inflection.VerbRoot.PastTenseRoot.EndsWith("و"))
               {
                   verbBuilder.Append("ی");
               }
               switch (inflection.Person)
               {
                   case PersonType.FIRST_PERSON_PLURAL:
                       verbBuilder.Append("یم");
                       break;
                   case PersonType.FIRST_PERSON_SINGULAR:
                       verbBuilder.Append("م");
                       break;
                   case PersonType.SECOND_PERSON_PLURAL:
                       verbBuilder.Append("ید");
                       break;
                   case PersonType.SECOND_PERSON_SINGULAR:
                       verbBuilder.Append("ی");
                       break;
                   case PersonType.THIRD_PERSON_PLURAL:
                       verbBuilder.Append("ند");
                       break;
               }
               lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
               return lstInflections;
        }
        private static string AddAttachedPronoun(string verb, VerbInflection inflection)
        {
            string inflectedVerb = verb;

            switch (inflection.ZamirPeyvasteh)
            {
            case AttachedPronounType.THIRD_PERSON_SINGULAR:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یش";
                    inflectedVerb += "یش";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.AttachedPronounString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.AttachedPronounString = "‌اش";
                    inflectedVerb += "‌اش";
                }
                else
                {
                    inflection.AttachedPronounString = "ش";
                    inflectedVerb += "ش";
                }
                break;

            case AttachedPronounType.THIRD_PERSON_PLURAL:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یشان";
                    inflectedVerb += "یشان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌شان";
                    inflectedVerb += "‌شان";
                }
                else
                {
                    inflection.AttachedPronounString = "شان";
                    inflectedVerb += "شان";
                }
                break;

            case AttachedPronounType.SECOND_PERSON_PLURAL:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یتان";
                    inflectedVerb += "یتان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌تان";
                    inflectedVerb += "‌تان";
                }
                else
                {
                    inflection.AttachedPronounString = "تان";
                    inflectedVerb += "تان";
                } break;

            case AttachedPronounType.SECOND_PERSON_SINGULAR:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یت";
                    inflectedVerb += "یت";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.AttachedPronounString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.AttachedPronounString = "‌ات";
                    inflectedVerb += "‌ات";
                }
                else
                {
                    inflection.AttachedPronounString = "ت";
                    inflectedVerb += "ت";
                }
                break;

            case AttachedPronounType.FIRST_PERSON_PLURAL:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یمان";
                    inflectedVerb += "یمان";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌مان";
                    inflectedVerb += "‌مان";
                }
                else
                {
                    inflection.AttachedPronounString = "مان";
                    inflectedVerb += "مان";
                }
                break;

            case AttachedPronounType.FIRST_PERSON_SINGULAR:
                if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
                {
                    inflection.AttachedPronounString = "یم";
                    inflectedVerb += "یم";
                }
                else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
                {
                    inflection.AttachedPronounString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
                {
                    inflection.AttachedPronounString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else if (verb.EndsWith("‌ای"))
                {
                    inflection.AttachedPronounString = "‌ام";
                    inflectedVerb += "‌ام";
                }
                else
                {
                    inflection.AttachedPronounString = "م";
                    inflectedVerb += "م";
                }
                break;
            }
            return(inflectedVerb);
        }
 private static string AddAttachedPronoun(string verb, VerbInflection inflection)
 {
     string inflectedVerb = verb;
     switch (inflection.ZamirPeyvasteh)
     {
         case AttachedPronounType.THIRD_PERSON_SINGULAR:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یش";
                 inflectedVerb += "یش";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.AttachedPronounString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.AttachedPronounString = "‌اش";
                 inflectedVerb += "‌اش";
             }
             else
             {
                 inflection.AttachedPronounString = "ش";
                 inflectedVerb += "ش";
             }
             break;
         case AttachedPronounType.THIRD_PERSON_PLURAL:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یشان";
                     inflectedVerb += "یشان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌شان";
                 inflectedVerb += "‌شان";
             }
             else
             {
                 inflection.AttachedPronounString = "شان";
                 inflectedVerb += "شان";
             }
             break;
         case AttachedPronounType.SECOND_PERSON_PLURAL:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یتان";
                 inflectedVerb += "یتان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌تان";
                 inflectedVerb += "‌تان";
             }
            else
             {
                 inflection.AttachedPronounString = "تان";
                 inflectedVerb += "تان";
             } break;
         case AttachedPronounType.SECOND_PERSON_SINGULAR:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یت";
                 inflectedVerb += "یت";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.AttachedPronounString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.AttachedPronounString = "‌ات";
                 inflectedVerb += "‌ات";
             }
             else
             {
                 inflection.AttachedPronounString = "ت";
                 inflectedVerb += "ت";
             }
             break;
         case AttachedPronounType.FIRST_PERSON_PLURAL:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یمان";
                 inflectedVerb += "یمان";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌مان";
                 inflectedVerb += "‌مان";
             }
             else
             {
                 inflection.AttachedPronounString = "مان";
                 inflectedVerb += "مان";
             }
             break;
         case AttachedPronounType.FIRST_PERSON_SINGULAR:
             if (verb.EndsWith("آ") || verb.EndsWith("ا") || verb.EndsWith("و"))
             {
                 inflection.AttachedPronounString = "یم";
                 inflectedVerb += "یم";
             }
             else if (verb.EndsWith("ه") && !verb.EndsWith("اه") && !verb.EndsWith("وه"))
             {
                 inflection.AttachedPronounString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else if (verb.EndsWith("ی") && !verb.EndsWith("ای") && !verb.EndsWith("وی"))
             {
                 inflection.AttachedPronounString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else if (verb.EndsWith("‌ای"))
             {
                 inflection.AttachedPronounString = "‌ام";
                 inflectedVerb += "‌ام";
             }
             else
             {
                 inflection.AttachedPronounString = "م";
                 inflectedVerb += "م";
             }
             break;
     }
     return inflectedVerb;
 }
示例#42
0
        /// <summary>
        /// Constructs all dictionaries used in the inflection program
        /// </summary>
        /// <param name="verbDicPath"></param>
        public VerbList(string verbDicPath)
        {
            VerbPishvandiDic = new Dictionary<string, List<string>>();
            VerbShapes = new Dictionary<string, List<VerbInflection>>();
            CompoundVerbDic = new Dictionary<Verb, Dictionary<string, Dictionary<string, bool>>>();
            var verbs = new List<Verb>();
            string[] records = File.ReadAllText(verbDicPath).Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
            foreach (var record in records)
            {
                string[] fields = record.Split("\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                int vtype = int.Parse(fields[0]);

                if (vtype == 1 || vtype == 2)
                {
                    var verbType = VerbType.SADEH;
                    if (vtype == 2)
                        verbType = VerbType.PISHVANDI;
                    int trans = int.Parse(fields[1]);
                    var transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                        transitivity = VerbTransitivity.InTransitive;
                    else if (trans == 2)
                        transitivity = VerbTransitivity.BiTransitive;
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    Verb verb;
                    bool amrShodani = true;
                    if (fields[7] == "*")
                        amrShodani = false;
                    string vowelEnd = fields[8];
                    string maziVowel = fields[9];
                    string mozarehVowel = fields[10];
                    if (fields[3] == "-")
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else if (fields[2] == "-")
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);

                    verbs.Add(verb);
                    if (verb.Type == VerbType.PISHVANDI)
                    {
                        verbs.Add(new Verb("", "", "خواه", pishvand, "", VerbTransitivity.InTransitive,
                                           VerbType.AYANDEH_PISHVANDI, false, "?", "@", "!"));
                        if (VerbPishvandiDic.ContainsKey(pishvand))
                        {
                            VerbPishvandiDic[pishvand].Add(verb.PastTenseRoot + "|" + verb.PresentTenseRoot);
                        }
                        else
                        {
                            var lst = new List<string>();
                            lst.Add(verb.PastTenseRoot + "|" + verb.PresentTenseRoot);
                            VerbPishvandiDic.Add(pishvand, lst);
                        }
                    }
                }
                else if (vtype == 3)
                {
                    var verbType = VerbType.SADEH;
                    int trans = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                        transitivity = VerbTransitivity.InTransitive;
                    else if (trans == 2)
                        transitivity = VerbTransitivity.BiTransitive;
                    Verb verb;
                    bool amrShodani = true;
                    string vowelEnd = fields[8];
                    string maziVowel = fields[9];
                    string mozarehVowel = fields[10];
                    string nonVerbalElemant = fields[4];
                    if (fields[3] == "-")
                        verb = new Verb("", fields[2], "", "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else if (fields[2] == "-")
                        verb = new Verb("", "", fields[3], "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else
                        verb = new Verb("", fields[2], fields[3], "", "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    if (fields[7] == "*")
                        amrShodani = false;
                    var istran=true;
                    if(transitivity==VerbTransitivity.InTransitive)
                        istran=false;

                    if (!CompoundVerbDic.ContainsKey(verb))
                        CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                        CompoundVerbDic[verb][nonVerbalElemant].Add("", istran);

                }
                else if (vtype == 4)
                {
                    var verbType = VerbType.PISHVANDI;
                    int trans = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                        transitivity = VerbTransitivity.InTransitive;
                    else if (trans == 2)
                        transitivity = VerbTransitivity.BiTransitive;
                    Verb verb;
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    bool amrShodani = true;
                    string vowelEnd = fields[8];
                    string maziVowel = fields[9];
                    string mozarehVowel = fields[10];
                    string nonVerbalElemant = fields[4];
                    if (fields[3] == "-")
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else if (fields[2] == "-")
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    if (fields[7] == "*")
                        amrShodani = false;
                    var istrans=true;
                    if(transitivity==VerbTransitivity.InTransitive)
                        istrans=false;
                    if (!CompoundVerbDic.ContainsKey(verb))
                        CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                        CompoundVerbDic[verb][nonVerbalElemant].Add("", istrans);
                }
                else if (vtype == 5 || vtype == 7)
                {
                    var verbType = VerbType.SADEH;
                    int trans = int.Parse(fields[1]);
                    VerbTransitivity transitivity = VerbTransitivity.Transitive;
                    if (trans == 0)
                        transitivity = VerbTransitivity.InTransitive;
                    else if (trans == 2)
                        transitivity = VerbTransitivity.BiTransitive;
                    Verb verb;
                    string pishvand = "";
                    if (fields[5] != "-")
                    {
                        pishvand = fields[5];
                    }
                    if (pishvand != "")
                    {
                        verbType = VerbType.PISHVANDI;
                    }
                    bool amrShodani = true;
                    string vowelEnd = fields[8];
                    string maziVowel = fields[9];
                    string mozarehVowel = fields[10];
                    string nonVerbalElemant = fields[4];
                    string harfeEazafeh = fields[6];
                    if (fields[3] == "-")
                        verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else if (fields[2] == "-")
                        verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    else
                        verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                        vowelEnd, maziVowel, mozarehVowel);
                    if (fields[7] == "*")
                        amrShodani = false;
                    var istrans=true;
                    if(transitivity==VerbTransitivity.InTransitive)
                        istrans=false;
                    if (!CompoundVerbDic.ContainsKey(verb))
                        CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                    if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                    {
                        CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                    }
                    if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(harfeEazafeh))

                        CompoundVerbDic[verb][nonVerbalElemant].Add(harfeEazafeh, istrans);
                }
            }
            var verbtext = new StringBuilder();
            var mitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                                     PersonType.PERSON_NONE,
                                                                     TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
            VerbShapes.Add("می‌توان", new List<VerbInflection>());
            VerbShapes["می‌توان"].Add(mitavanInflection);
            var nemitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                                     PersonType.PERSON_NONE,
                                                                     TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
            VerbShapes.Add("نمی‌توان", new List<VerbInflection>());
            VerbShapes["نمی‌توان"].Add(nemitavanInflection);

            VerbShapes.Add("میتوان", new List<VerbInflection>());
            VerbShapes["میتوان"].Add(mitavanInflection);
            VerbShapes.Add("نمیتوان", new List<VerbInflection>());
            VerbShapes["نمیتوان"].Add(nemitavanInflection);

            var betavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                                   PersonType.PERSON_NONE,
                                                                   TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
            VerbShapes.Add("بتوان", new List<VerbInflection>());
            VerbShapes["بتوان"].Add(betavanInflection);

            var naitavanInflection = new VerbInflection(new Verb("", "", "توان", "", "", VerbTransitivity.InTransitive, VerbType.SADEH, false, "?", "@", "!"), AttachedPronounType.AttachedPronoun_NONE, "",
                                                                     PersonType.PERSON_NONE,
                                                                     TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
            VerbShapes.Add("نتوان", new List<VerbInflection>());
            VerbShapes["نتوان"].Add(naitavanInflection);

            foreach (Verb verb in verbs)
            {
                if (verb.Type == VerbType.SADEH || verb.Type == VerbType.PISHVANDI || verb.Type == VerbType.AYANDEH_PISHVANDI)
                {
                    foreach (TensePositivity positivity in Enum.GetValues(typeof(TensePositivity)))
                    {
                        foreach (PersonType shakhsType in Enum.GetValues(typeof(PersonType)))
                        {
                            foreach (
                                TenseFormationType tenseFormationType in
                                    Enum.GetValues(typeof(TenseFormationType)))
                            {
                                foreach (
                                    AttachedPronounType zamirPeyvastehType in
                                        Enum.GetValues(typeof(AttachedPronounType)))
                                {

                                    var inflection = new VerbInflection(verb, zamirPeyvastehType, "",
                                                                        shakhsType,
                                                                        tenseFormationType, positivity);
                                    if (inflection.IsValid())
                                    {
                                        var output = InflectorAnalyzeSentencer.GetInflections(inflection);
                                        if (inflection.VerbRoot.PastTenseRoot == "بایست")
                                        {
                                            if (output[0].Contains("بایست"))
                                            {
                                                inflection.Person = PersonType.PERSON_NONE;
                                                inflection.TenseForm = TenseFormationType.GOZASHTEH_SADEH;
                                            }
                                            else
                                            {
                                                inflection.Person = PersonType.PERSON_NONE;
                                                inflection.TenseForm = TenseFormationType.HAAL_SAADEH;
                                            }
                                        }
                                        var output2=new List<string>();
                                        foreach (string list in output)
                                        {
                                            output2.Add (list);
                                            //Console.WriteLine(list);
                                            if (list.Contains("می‌")){
                                                var newshape=list.Replace("می‌","می");
                                                output2.Add (newshape);
                                                //Console.WriteLine(newshape);
                                            }

                                        }
                                        foreach (string list in output2)
                                        {
                                            if (!(VerbShapes.ContainsKey(list)))
                                            {
                                                var verbInflections = new List<VerbInflection> { inflection };
                                                VerbShapes.Add(list, verbInflections);
                                            }
                                            else
                                            {
                                                bool contains = false;
                                                foreach (VerbInflection inf in VerbShapes[list])
                                                {
                                                    if (inflection.Equals(inf))
                                                    {
                                                        contains = true;
                                                        break;
                                                    }
                                                }
                                                if (!contains)
                                                {
                                                    //This for zamir_peyvaste rule based disambiguation in which the inflections
                                                    //without zamir_peyvaste are rathered to remain
                                                    for (int i = 0; i < VerbShapes[list].Count; i++)
                                                    {
                                                        var verbInflection = VerbShapes[list][i];
                                                        if (verbInflection.ZamirPeyvasteh !=
                                                            AttachedPronounType.AttachedPronoun_NONE)
                                                        {
                                                            VerbShapes[list].Remove(verbInflection);
                                                        }

                                                    }
                                                    VerbShapes[list].Add(inflection);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        private static List<string> GetHaalSaadehInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            if (inflection.VerbRoot.PastTenseRoot == "خواست"  || inflection.VerbRoot.PastTenseRoot == "خواست" || inflection.VerbRoot.PastTenseRoot == "داشت" || inflection.VerbRoot.PastTenseRoot == "بایست"|| inflection.VerbRoot.Type==VerbType.AYANDEH_PISHVANDI)
            {
                var verbBuilder = new StringBuilder();
                verbBuilder.Append(inflection.VerbRoot.Prefix);
                if (inflection.Positivity==TensePositivity.NEGATIVE)
                {
                        verbBuilder.Append("ن");
                }
                verbBuilder.Append(inflection.VerbRoot.PresentTenseRoot);

                if (inflection.VerbRoot.PresentRootConsonantVowelEndStem == "A")
                {
                    if (verbBuilder.Length > 1)
                    {
                        verbBuilder.Remove(verbBuilder.Length - 1, 1);
                        verbBuilder.Append("ای");
                    }
                    else
                        verbBuilder.Append("ی");
                }
                else if (inflection.VerbRoot.PresentRootConsonantVowelEndStem != "?")
                {
                    verbBuilder.Append("ی");
                }
                switch (inflection.Person)
                {
                    case PersonType.FIRST_PERSON_PLURAL:
                        verbBuilder.Append("یم");
                        break;
                    case PersonType.FIRST_PERSON_SINGULAR:
                        verbBuilder.Append("م");
                        break;
                    case PersonType.SECOND_PERSON_PLURAL:
                        verbBuilder.Append("ید");
                        break;
                    case PersonType.SECOND_PERSON_SINGULAR:
                        verbBuilder.Append("ی");
                        break;
                    case PersonType.THIRD_PERSON_PLURAL:
                        verbBuilder.Append("ند");
                        break;
                    case PersonType.THIRD_PERSON_SINGULAR:
                        if (inflection.VerbRoot.PastTenseRoot != "بایست")
                        verbBuilder.Append("د");
                        break;
                }
                lstInflections.Add(AddAttachedPronoun(verbBuilder.ToString(), inflection));
            }
            return lstInflections;
        }
        private static List<string> GetAmrInflections(VerbInflection inflection)
        {
            var lstInflections = new List<string>();
            var verbBuilder1 = new StringBuilder();
            var verbBuilder2 = new StringBuilder();
            var verbBuilder3 = new StringBuilder();
            if (inflection.VerbStem.Pishvand != "")
            {
                verbBuilder1.Append(inflection.VerbStem.Pishvand);
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbStem.Pishvand);
                }
                if (inflection.Positivity == TensePositivity.POSITIVE)
                {
                    verbBuilder2.Append(inflection.VerbStem.Pishvand);
                }
            }
            switch (inflection.Positivity)
            {
                case TensePositivity.POSITIVE:
                    if (!(inflection.VerbStem.HastehMozareh == "باش" || inflection.VerbStem.HastehMozareh == "باید"))
                        verbBuilder1.Append("ب");
                    break;
                case TensePositivity.NEGATIVE:
                    verbBuilder1.Append("ن");
                    verbBuilder3.Append("م");
                    break;
            }
            if (inflection.VerbStem.HastehMozarehVowelStart == "A")
            {
                if (inflection.VerbStem.HastehMozareh.StartsWith("آ"))
                {
                    verbBuilder1.Append("یا");
                    verbBuilder1.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("یا");
                        verbBuilder3.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                    }
                }
                else
                {
                    verbBuilder1.Append("ی");
                    verbBuilder1.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    if (inflection.Positivity == TensePositivity.NEGATIVE)
                    {
                        verbBuilder3.Append("ی");
                        verbBuilder3.Append(inflection.VerbStem.HastehMozareh.Remove(0, 1));
                    }
                    if (inflection.Positivity == TensePositivity.POSITIVE)
                    {
                        verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                    }
                }
            }
            else
            {
                verbBuilder1.Append(inflection.VerbStem.HastehMozareh);
                if (inflection.Positivity == TensePositivity.POSITIVE/* && inflection.VerbStem.Type==VerbType.PISHVANDI*/)
                {
                    verbBuilder2.Append(inflection.VerbStem.HastehMozareh);
                }
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                {
                    verbBuilder3.Append(inflection.VerbStem.HastehMozareh);
                }
            }

            switch (inflection.Shakhs)
            {
                case ShakhsType.DOVVOMSHAKHS_JAM:
                    if (inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                    {
                        verbBuilder1.Append("یید");
                        if (inflection.Positivity == TensePositivity.NEGATIVE)
                        {
                            verbBuilder3.Append("یید");
                        }
                        if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                        {
                            verbBuilder2.Append("یید");
                        }
                    }
                    else
                    {
                        verbBuilder1.Append("ید");
                        if (inflection.Positivity == TensePositivity.NEGATIVE)
                        {
                            verbBuilder3.Append("ید");
                        }
                        if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                        {
                            verbBuilder2.Append("ید");
                        }
                    }
                    break;
            }
            if (inflection.ZamirPeyvasteh == ZamirPeyvastehType.ZamirPeyvasteh_NONE)
            {
                if (!(inflection.VerbStem.HastehMozareh == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                    lstInflections.Add(verbBuilder1.ToString());
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                    lstInflections.Add(verbBuilder3.ToString());
                if (inflection.Positivity == TensePositivity.POSITIVE && inflection.VerbStem.Type == VerbType.PISHVANDI)
                    lstInflections.Add(verbBuilder2.ToString());
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Shakhs == ShakhsType.DOVVOMSHAKHS_MOFRAD && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(verbBuilder2.Append("ی").ToString());
                }
            }
            else
            {
                if (!(inflection.VerbStem.HastehMozareh == "نه" && inflection.Positivity == TensePositivity.NEGATIVE))
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder1.ToString(), inflection));
                if (inflection.Positivity == TensePositivity.NEGATIVE)
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder3.ToString(), inflection));
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Positivity == TensePositivity.POSITIVE)
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.ToString(), inflection));
                if (inflection.VerbStem.Type == VerbType.PISHVANDI && inflection.Shakhs == ShakhsType.DOVVOMSHAKHS_MOFRAD && inflection.Positivity == TensePositivity.POSITIVE &&
                    inflection.VerbStem.HastehMozarehConsonantVowelEndStem != "?")
                {
                    lstInflections.Add(AddZamirPeyvasteh(verbBuilder2.Append("ی").ToString(), inflection));
                }
            }
            return lstInflections;
        }
        /// <summary>
        /// Get the verb tokens with their corresponding details
        /// </summary>
        /// <param name="sentence">array of words in the sentence</param>
        /// <param name="posTokens">array of POS tags in the sentence</param>
        /// <param name="newPosTokens">to be converted: new array of POS tags in the sentence</param>
        /// <param name="lemmas">array of lemmas in the sentence</param>
        /// <param name="outLemmas">to be converted: new array of lemmas in the sentence</param>
        /// <param name="verbDicPath">path of dictionary file</param>
        /// <returns></returns>
        public static Dictionary<int, KeyValuePair<string, VerbInflection>> GetVerbTokens(string[] sentence, string[] posTokens, out string[] newPosTokens, string[] lemmas, out string[] outLemmas)
        {
            var outputResults = new Dictionary<int, KeyValuePair<string, VerbInflection>>();
            var output = GetOutputResult(sentence, posTokens, out newPosTokens, lemmas, out outLemmas);
            for (int i = 0; i < output.Count; i++)
            {
                var values = output[i];
                VerbInflection inflection;
                TensePassivity passivity;
                TensePositivity positivity;
                Verb verb;
                PersonType shakhsType;
                TenseFormationType tenseFormationType;
                AttachedPronounType zamirPeyvastehType;
                string zamirString;
                List<VerbInflection> tempInfleclist;
                VerbInflection tempInflec;
                string[] tokens = output[i].Key.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                switch (values.Value)
                {
                    #region 10

                    case 10:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                       positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 53

                    case 53:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH && (inflectionIter.VerbRoot.PastTenseRoot == "بایست" || inflectionIter.VerbRoot.PresentTenseRoot == "توان"))
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                       positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 14

                    case 14:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 15

                    case 15:
                        tenseFormationType = TenseFormationType.AMR;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.AMR)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirString = tempInflec.AttachedPronounString;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 17

                    case 17:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 18

                    case 18:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 20

                    case 20:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 21

                    case 21:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        shakhsType = tempInflec.Person;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                        positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 11

                    case 11:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 16

                    case 16:
                        tenseFormationType = TenseFormationType.AMR;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.AMR)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 12

                    case 12:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 13

                    case 13:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 19

                    case 19:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 22

                    case 22:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 23

                    case 23:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 24

                    case 24:
                        tenseFormationType = TenseFormationType.HAAL_SAADEH_EKHBARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH_EKHBARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 25

                    case 25:
                        tenseFormationType = TenseFormationType.HAAL_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 26

                    case 26:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 27

                    case 27:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();

                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        if (tokens.Length == 2)
                        {
                            if (tokens[1] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 28

                    case 28:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 29

                    case 29:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 30

                    case 30:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 31

                    case 31:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        verb = new Verb("", tempInflec.VerbRoot.PastTenseRoot, tempInflec.VerbRoot.PresentTenseRoot,
                                        tempInflec.VerbRoot.Prefix, "", VerbTransitivity.Transitive,
                                        tempInflec.VerbRoot.Type, true,
                                        tempInflec.VerbRoot.PresentRootConsonantVowelEndStem,
                                        tempInflec.VerbRoot.PastRootVowelStart,
                                        tempInflec.VerbRoot.PresentRootVowelStart);
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                        if (inflectionIter.IsPayehFelMasdari() && inflectionIter.Positivity==TensePositivity.POSITIVE)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb.PastTenseRoot = tempInflec.VerbRoot.PastTenseRoot;
                        verb.PresentTenseRoot = tempInflec.VerbRoot.PresentTenseRoot;
                        verb.Transitivity = tempInflec.VerbRoot.Transitivity;
                        verb.CanBeImperative = tempInflec.VerbRoot.CanBeImperative;
                        verb.PresentRootConsonantVowelEndStem = tempInflec.VerbRoot.PresentRootConsonantVowelEndStem;
                        verb.PastRootVowelStart = tempInflec.VerbRoot.PastRootVowelStart;
                        verb.PresentRootVowelStart = tempInflec.VerbRoot.PresentRootVowelStart;
                        if (zamirPeyvastehType == AttachedPronounType.AttachedPronoun_NONE)
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 32

                    case 32:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.PASSIVE; //ToCheck
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        verb = new Verb("", tempInflec.VerbRoot.PastTenseRoot, tempInflec.VerbRoot.PresentTenseRoot,
                                        tempInflec.VerbRoot.Prefix, "", VerbTransitivity.Transitive,
                                        tempInflec.VerbRoot.Type, true,
                                        tempInflec.VerbRoot.PresentRootConsonantVowelEndStem,
                                        tempInflec.VerbRoot.PastRootVowelStart,
                                        tempInflec.VerbRoot.PresentRootVowelStart);
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.IsPayehFelMasdari())
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb.PastTenseRoot = "کرد";
                        verb.PresentTenseRoot = "کن";
                        verb.Transitivity = VerbTransitivity.Transitive;
                        verb.CanBeImperative = tempInflec.VerbRoot.CanBeImperative;
                        verb.PresentRootConsonantVowelEndStem = tempInflec.VerbRoot.PresentRootConsonantVowelEndStem;
                        verb.PastRootVowelStart = tempInflec.VerbRoot.PastRootVowelStart;
                        verb.PresentRootVowelStart = tempInflec.VerbRoot.PresentRootVowelStart;
                        if (zamirPeyvastehType == AttachedPronounType.AttachedPronoun_NONE)
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 34

                    case 34:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 38,39

                    case 38:
                    case 39:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 41

                    case 41:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        positivity = tempInflec.Positivity;
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 42

                    case 42:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        positivity = tempInflec.Positivity;
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 33

                    case 33:
                        tenseFormationType = TenseFormationType.AAYANDEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        if (shakhsType == PersonType.PERSON_NONE)
                            shakhsType = tempInflec.Person;

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 35

                    case 35:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        if (tokens.Length == 3)
                        {
                            if (tokens[2] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = AttachedPronounType.AttachedPronoun_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 36

                    case 36:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];

                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = TensePositivity.POSITIVE;

                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 37

                    case 37:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                        if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH  || inflectionIter.TenseForm == TenseFormationType.HAAL_ELTEZAMI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = TensePositivity.POSITIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 40

                    case 40:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        if (tokens.Length == 3)
                        {
                            if (tokens[2] == "نیست")
                            {
                                positivity = TensePositivity.NEGATIVE;
                            }
                            else
                            {
                                positivity = TensePositivity.POSITIVE;
                            }
                        }
                        else
                        {
                            positivity = TensePositivity.POSITIVE;
                        }
                        zamirPeyvastehType = AttachedPronounType.AttachedPronoun_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 43

                    case 43:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = TensePositivity.NEGATIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 44

                    case 44:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        tempInfleclist = VerbList.VerbShapes[tokens[2]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.HAAL_SAADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        shakhsType = tempInflec.Person;
                        positivity = TensePositivity.NEGATIVE;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 45
                    case 45:
                        tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");

                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;
                    #endregion

                    #region 46

                    case 46:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 47

                    case 47:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 48

                    case 48:
                        tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 49

                    case 49:
                        tenseFormationType = TenseFormationType.GOZASHTEH_BAEED;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 50

                    case 50:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ELTEZAMI;
                        passivity = TensePassivity.PASSIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");
                        shakhsType = tempInflec.Person;
                        positivity = tempInflec.Positivity;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 51

                    case 51:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ABAD;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;

                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_SADEH)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }

                        shakhsType = tempInflec.Person;
                        zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region 52

                    case 52:
                        tenseFormationType = TenseFormationType.GOZASHTEH_ABAD;
                        passivity = TensePassivity.ACTIVE;
                        tempInfleclist = VerbList.VerbShapes[tokens[0]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                        verb = tempInflec.VerbRoot.Clone();
                        positivity = tempInflec.Positivity;

                        tempInfleclist = VerbList.VerbShapes[tokens[1]];
                        tempInflec = null;
                        foreach (VerbInflection inflectionIter in tempInfleclist)
                        {
                            if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                            {
                                tempInflec = inflectionIter;
                                break;
                            }
                        }
                    if (tempInflec!=null){
                        positivity = tempInflec.Positivity;
                        passivity=TensePassivity.PASSIVE;
                    }

                        shakhsType = PersonType.THIRD_PERSON_SINGULAR;

                        zamirPeyvastehType = AttachedPronounType.AttachedPronoun_NONE; zamirString = "";

                        inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                         positivity, passivity);
                        outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        break;

                    #endregion

                    #region default
                    default:
                        VerbInflection nullinflec = null;
                        if (i == output.Count - 1 && output[i].Value == 1)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 5)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 4)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_SADEH;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 7)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();

                            tempInfleclist = VerbList.VerbShapes[tokens[1]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.VerbRoot.PastTenseRoot == "شد")
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 6)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI;
                            passivity = TensePassivity.ACTIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.GOZASHTEH_NAGHLI_ESTEMRAARI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else if (i == output.Count - 1 && output[i].Value == 9)
                        {
                            tenseFormationType = TenseFormationType.GOZASHTEH_SADEH;
                            passivity = TensePassivity.PASSIVE;
                            tempInfleclist = VerbList.VerbShapes[tokens[0]];
                            tempInflec = null;
                            foreach (VerbInflection inflectionIter in tempInfleclist)
                            {
                                if (inflectionIter.TenseForm == TenseFormationType.PAYEH_MAFOOLI)
                                {
                                    tempInflec = inflectionIter;
                                    break;
                                }
                            }
                            verb = tempInflec.VerbRoot.Clone();
                            positivity = tempInflec.Positivity;
                            zamirPeyvastehType = tempInflec.ZamirPeyvasteh; zamirString = tempInflec.AttachedPronounString;
                            verb = new Verb(verb.PrepositionOfVerb, "کرد", "کن", verb.Prefix, verb.NonVerbalElement, VerbTransitivity.Transitive, verb.Type, true, "?", "@", "!");

                            shakhsType = PersonType.THIRD_PERSON_SINGULAR;
                            inflection = new VerbInflection(verb, zamirPeyvastehType, zamirString, shakhsType, tenseFormationType,
                                                             positivity, passivity);
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, inflection));
                        }
                        else
                        {
                            outputResults.Add(i, new KeyValuePair<string, VerbInflection>(output[i].Key, nullinflec));
                        }
                        break;
                    #endregion
                }
            }
            return outputResults;
        }
示例#46
0
        public VerbList(string verbDicPath)
        {
            if (VerbShapes == null)
            {
                VerbPishvandiDic = new Dictionary<string, List<string>>();
                VerbShapes = new Dictionary<string, List<VerbInflection>>();
                CompoundVerbDic = new Dictionary<Verb, Dictionary<string, Dictionary<string, bool>>>();
                var verbs = new List<Verb>();
                string[] records = File.ReadAllText(verbDicPath).Split("\r\n".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                foreach (var record in records)
                {

                    string[] fields = record.Split("\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                    int vtype = int.Parse(fields[0]);

                    if (vtype == 1 || vtype == 2)
                    {
                        var verbType = VerbType.SADEH;
                        if (vtype == 2)
                            verbType = VerbType.PISHVANDI;
                        int trans = int.Parse(fields[1]);
                        var transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                            transitivity = VerbTransitivity.NAGOZAR;
                        else if (trans == 2)
                            transitivity = VerbTransitivity.DOVAJHI;
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        Verb verb;
                        bool amrShodani = true;
                        if (fields[7] == "*")
                            amrShodani = false;
                        string vowelEnd = fields[8];
                        string maziVowel = fields[9];
                        string mozarehVowel = fields[10];
                        if (fields[3] == "-")
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else if (fields[2] == "-")
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);

                        verbs.Add(verb);
                        if (verb.Type == VerbType.PISHVANDI)
                        {
                            verbs.Add(new Verb("", "", "خواه", pishvand, "", VerbTransitivity.NAGOZAR,
                                               VerbType.AYANDEH_PISHVANDI, false, "?", "@", "!"));
                            if (VerbPishvandiDic.ContainsKey(pishvand))
                            {
                                VerbPishvandiDic[pishvand].Add(verb.HastehMazi + "|" + verb.HastehMozareh);
                            }
                            else
                            {
                                var lst = new List<string>();
                                lst.Add(verb.HastehMazi + "|" + verb.HastehMozareh);
                                VerbPishvandiDic.Add(pishvand, lst);
                            }
                        }
                    }
                    else if (vtype == 3)
                    {
                        var verbType = VerbType.SADEH;
                        int trans = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                            transitivity = VerbTransitivity.NAGOZAR;
                        else if (trans == 2)
                            transitivity = VerbTransitivity.DOVAJHI;
                        Verb verb;
                        bool amrShodani = true;
                        string vowelEnd = fields[8];
                        string maziVowel = fields[9];
                        string mozarehVowel = fields[10];
                        string nonVerbalElemant = fields[4];
                        if (fields[3] == "-")
                            verb = new Verb("", fields[2], "", "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else if (fields[2] == "-")
                            verb = new Verb("", "", fields[3], "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else
                            verb = new Verb("", fields[2], fields[3], "", "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        if (fields[7] == "*")
                            amrShodani = false;
                        if (!CompoundVerbDic.ContainsKey(verb))
                            CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                            CompoundVerbDic[verb][nonVerbalElemant].Add("", amrShodani);

                    }
                    else if (vtype == 4)
                    {
                        var verbType = VerbType.PISHVANDI;
                        int trans = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                            transitivity = VerbTransitivity.NAGOZAR;
                        else if (trans == 2)
                            transitivity = VerbTransitivity.DOVAJHI;
                        Verb verb;
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        bool amrShodani = true;
                        string vowelEnd = fields[8];
                        string maziVowel = fields[9];
                        string mozarehVowel = fields[10];
                        string nonVerbalElemant = fields[4];
                        if (fields[3] == "-")
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else if (fields[2] == "-")
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        if (fields[7] == "*")
                            amrShodani = false;
                        if (!CompoundVerbDic.ContainsKey(verb))
                            CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(""))
                            CompoundVerbDic[verb][nonVerbalElemant].Add("", amrShodani);
                    }
                    else if (vtype == 5 || vtype == 7)
                    {
                        var verbType = VerbType.SADEH;
                        int trans = int.Parse(fields[1]);
                        VerbTransitivity transitivity = VerbTransitivity.GOZARA;
                        if (trans == 0)
                            transitivity = VerbTransitivity.NAGOZAR;
                        else if (trans == 2)
                            transitivity = VerbTransitivity.DOVAJHI;
                        Verb verb;
                        string pishvand = "";
                        if (fields[5] != "-")
                        {
                            pishvand = fields[5];
                        }
                        if (pishvand != "")
                        {
                            verbType = VerbType.PISHVANDI;
                        }
                        bool amrShodani = true;
                        string vowelEnd = fields[8];
                        string maziVowel = fields[9];
                        string mozarehVowel = fields[10];
                        string nonVerbalElemant = fields[4];
                        string harfeEazafeh = fields[6];
                        if (fields[3] == "-")
                            verb = new Verb("", fields[2], "", pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else if (fields[2] == "-")
                            verb = new Verb("", "", fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        else
                            verb = new Verb("", fields[2], fields[3], pishvand, "", transitivity, verbType, amrShodani,
                                            vowelEnd, maziVowel, mozarehVowel);
                        if (fields[7] == "*")
                            amrShodani = false;
                        if (!CompoundVerbDic.ContainsKey(verb))
                            CompoundVerbDic.Add(verb, new Dictionary<string, Dictionary<string, bool>>());
                        if (!CompoundVerbDic[verb].ContainsKey(nonVerbalElemant))
                        {
                            CompoundVerbDic[verb].Add(nonVerbalElemant, new Dictionary<string, bool>());
                        }
                        if (!CompoundVerbDic[verb][nonVerbalElemant].ContainsKey(harfeEazafeh))

                            CompoundVerbDic[verb][nonVerbalElemant].Add(harfeEazafeh, amrShodani);
                    }
                }
                var verbtext = new StringBuilder();
                var mitavanInflection = new VerbInflection(new Verb("", "", "می‌توان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                                         ShakhsType.Shakhs_NONE,
                                                                         TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
                VerbShapes.Add("می‌توان", new List<VerbInflection>());
                VerbShapes["می‌توان"].Add(mitavanInflection);
                var nemitavanInflection = new VerbInflection(new Verb("", "", "می‌توان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                                         ShakhsType.Shakhs_NONE,
                                                                         TenseFormationType.HAAL_SAADEH, TensePositivity.POSITIVE);
                VerbShapes.Add("نمی‌توان", new List<VerbInflection>());
                VerbShapes["نمی‌توان"].Add(nemitavanInflection);

                var betavanInflection = new VerbInflection(new Verb("", "", "بتوان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                                       ShakhsType.Shakhs_NONE,
                                                                       TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
                VerbShapes.Add("بتوان", new List<VerbInflection>());
                VerbShapes["بتوان"].Add(betavanInflection);

                var naitavanInflection = new VerbInflection(new Verb("", "", "نتوان", "", "", VerbTransitivity.NAGOZAR, VerbType.SADEH, false, "?", "@", "!"), ZamirPeyvastehType.ZamirPeyvasteh_NONE, "",
                                                                         ShakhsType.Shakhs_NONE,
                                                                         TenseFormationType.HAAL_ELTEZAMI, TensePositivity.POSITIVE);
                VerbShapes.Add("نتوان", new List<VerbInflection>());
                VerbShapes["نتوان"].Add(naitavanInflection);

                foreach (Verb verb in verbs)
                {
                    if (verb.Type == VerbType.SADEH || verb.Type == VerbType.PISHVANDI || verb.Type == VerbType.AYANDEH_PISHVANDI)
                    {
                        foreach (TensePositivity positivity in Enum.GetValues(typeof(TensePositivity)))
                        {
                            foreach (ShakhsType shakhsType in Enum.GetValues(typeof(ShakhsType)))
                            {
                                foreach (
                                    TenseFormationType tenseFormationType in
                                        Enum.GetValues(typeof(TenseFormationType)))
                                {
                                    foreach (
                                        ZamirPeyvastehType zamirPeyvastehType in
                                            Enum.GetValues(typeof(ZamirPeyvastehType)))
                                    {

                                        var inflection = new VerbInflection(verb, zamirPeyvastehType, "",
                                                                            shakhsType,
                                                                            tenseFormationType, positivity);
                                        if (inflection.IsValid())
                                        {
                                            var output = InflectorManager.GetInflections(inflection);
                                            foreach (string list in output)
                                            {
                                                if (!(VerbShapes.ContainsKey(list)))
                                                {
                                                    var verbInflections = new List<VerbInflection> { inflection };
                                                    VerbShapes.Add(list, verbInflections);
                                                }
                                                else
                                                {
                                                    bool contains = false;
                                                    foreach (VerbInflection inf in VerbShapes[list])
                                                    {
                                                        if (inflection.Equals(inf))
                                                        {
                                                            contains = true;
                                                            break;
                                                        }
                                                    }
                                                    if (!contains)
                                                        VerbShapes[list].Add(inflection);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }