Exemple #1
0
        public VerbPanel(CLexemeManaged lexeme)
        {
            InitializeComponent();

//            iLexemeId = iId;
            Lexeme = lexeme;

            m_dictForms = new Dictionary <string, StCell>();
            m_dictForms.Add("Pres1Sg", new StCell(textBoxPres1Sg));
            m_dictForms.Add("Pres2Sg", new StCell(textBoxPres2Sg));
            m_dictForms.Add("Pres3Sg", new StCell(textBoxPres3Sg));
            m_dictForms.Add("Pres1Pl", new StCell(textBoxPres1Pl));
            m_dictForms.Add("Pres2Pl", new StCell(textBoxPres2Pl));
            m_dictForms.Add("Pres3Pl", new StCell(textBoxPres3Pl));

            m_dictForms.Add("PastMSg", new StCell(textBoxPastMSg));
            m_dictForms.Add("PastFSg", new StCell(textBoxPastFSg));
            m_dictForms.Add("PastNSg", new StCell(textBoxPastNSg));
            m_dictForms.Add("PastPl", new StCell(textBoxPastPl));

            m_dictForms.Add("Infinitive", new StCell(textBoxInfinitive));

            m_dictForms.Add("ImperativeSg", new StCell(textBoxImperativeSg));
            m_dictForms.Add("ImperativePl", new StCell(textBoxImperativePl));
            m_dictForms.Add("PartPresActive", new StCell(textBoxPartPresActive));
            m_dictForms.Add("PresAdverbial", new StCell(textBoxPresAdverbial));
            m_dictForms.Add("PartPastActive", new StCell(textBoxPartPastActive));
            m_dictForms.Add("PastAdverbial", new StCell(textBoxPastAdverbial));
            m_dictForms.Add("PartPresPassive", new StCell(textBoxPartPresPassive));
            m_dictForms.Add("PartPastPassive", new StCell(textBoxPartPastPassive));
        }
Exemple #2
0
        public VerbPanel(CLexemeManaged lexeme)
        {
            InitializeComponent();

            //            iLexemeId = iId;
            Lexeme = lexeme;

            m_dictForms = new Dictionary<string, StCell>();
            m_dictForms.Add ("Pres1Sg", new StCell (textBoxPres1Sg));
            m_dictForms.Add("Pres2Sg", new StCell (textBoxPres2Sg));
            m_dictForms.Add("Pres3Sg", new StCell (textBoxPres3Sg));
            m_dictForms.Add("Pres1Pl", new StCell (textBoxPres1Pl));
            m_dictForms.Add("Pres2Pl", new StCell (textBoxPres2Pl));
            m_dictForms.Add("Pres3Pl", new StCell (textBoxPres3Pl));

            m_dictForms.Add("PastMSg", new StCell (textBoxPastMSg));
            m_dictForms.Add("PastFSg", new StCell (textBoxPastFSg));
            m_dictForms.Add("PastNSg", new StCell (textBoxPastNSg));
            m_dictForms.Add("PastPl", new StCell (textBoxPastPl));

            m_dictForms.Add("Infinitive", new StCell(textBoxInfinitive));

            m_dictForms.Add("ImperativeSg", new StCell (textBoxImperativeSg));
            m_dictForms.Add("ImperativePl", new StCell (textBoxImperativePl));
            m_dictForms.Add("PartPresActive", new StCell (textBoxPartPresActive));
            m_dictForms.Add("PresAdverbial", new StCell (textBoxPresAdverbial));
            m_dictForms.Add("PartPastActive", new StCell (textBoxPartPastActive));
            m_dictForms.Add("PastAdverbial", new StCell (textBoxPastAdverbial));
            m_dictForms.Add("PartPresPassive", new StCell (textBoxPartPresPassive));
            m_dictForms.Add("PartPastPassive", new StCell (textBoxPartPastPassive));
        }
Exemple #3
0
        public void LexemeDataPanel_Save(LexemeDataPanel ldpSource)
        {
            try
            {
                CLexemeManaged lexeme = m_hashLexemes[ldpSource];
                lexeme.eGenerateParadigm();
                lexeme.eSaveTestData();
                MessageBox.Show("Forms saved in the database.", "Zal", MessageBoxButtons.OK);
            }
            catch (Exception ex)
            {
//                MainLib.ZalError err = new MainLib.ZalError();
                string sMsg = "LexemeDataPanel_Save: ";
                sMsg += ex.Message;
                MessageBox.Show(sMsg, "Zal Error", MessageBoxButtons.OK);
                return;
            }
        }
Exemple #4
0
        }       //  ShowParticipialForms (...)

        protected void ShowShortParticipialForms(AdjPanel ap, CLexemeManaged lexeme, EM_Subparadigm eoSpShort)
        {
            CGramHasherManaged hasher = new CGramHasherManaged();

            hasher.SetPartOfSpeech(EM_PartOfSpeech.POS_VERB);
            hasher.SetSubparadigm(eoSpShort);
            hasher.SetReflexivity(lexeme.eIsReflexive());
            hasher.SetAspect(lexeme.eAspect());
            hasher.SetNumber(EM_Number.NUM_SG);
            for (EM_Gender eGender = EM_Gender.GENDER_M;
                 eGender < EM_Gender.GENDER_COUNT;
                 ++eGender)
            {
                hasher.SetGender(eGender);
                uint uiForms = lexeme.uiFormCount(hasher.iHash());
                for (uint uiForm = 0; uiForm < uiForms; ++uiForm)
                {
                    CWordFormManaged wf = null;
//                    lexeme.eWordFormFromHash(hasher.iHash(), lexeme.uiFormCount(hasher.iHash()), ref wf);
                    lexeme.eWordFormFromHash(hasher.iHash(), uiForm, ref wf);
                    string sKey = "Short";
                    sKey += m_hashGender[wf.eGender()];
                    sKey += m_hashNumber[wf.eNumber()];
                    string sWordForm = wf.sWordForm();
                    MarkStress(ref sWordForm, wf);
                    ap.SetForm(sKey, sWordForm, wf.eStatus());
                }
            }

            hasher.SetNumber(EM_Number.NUM_PL);
            hasher.SetGender(EM_Gender.GENDER_UNDEFINED);
            for (uint uiForm = 0; uiForm < lexeme.uiFormCount(hasher.iHash()); ++uiForm)
            {
                CWordFormManaged wf = null;
                lexeme.eWordFormFromHash(hasher.iHash(), uiForm, ref wf);
                string sKey = "Short";
                sKey += m_hashNumber[wf.eNumber()];
                string sWordForm = wf.sWordForm();
                MarkStress(ref sWordForm, wf);
                ap.SetForm(sKey, sWordForm, wf.eStatus());
            }
        }   //  ShowShortParticipialForms (...)
Exemple #5
0
        }   //  ShowLexemeDetails (...)

        protected void ShowParticipialForms(CLexemeManaged lexeme,
                                            EM_Subparadigm eoSpLong,
                                            EM_Subparadigm eoSpShort)
        {
            // Expect word forms to be ready by now

            CGramHasherManaged hasher = new CGramHasherManaged();

            hasher.SetPartOfSpeech(EM_PartOfSpeech.POS_VERB);
            hasher.SetSubparadigm(eoSpLong);
            hasher.SetNumber(EM_Number.NUM_SG);
            hasher.SetCase(EM_Case.CASE_NOM);
            hasher.SetGender(EM_Gender.GENDER_M);
            hasher.SetAnimacy(EM_Animacy.ANIM_NO);
            hasher.SetAspect(lexeme.eAspect());
            hasher.SetReflexivity(lexeme.eIsReflexive());

            CWordFormManaged wf      = null;
            uint             uiForms = lexeme.uiFormCount(hasher.iHash());

            if (uiForms > 0)
            {
                lexeme.eWordFormFromHash(hasher.iHash(), 0, ref wf);
                AdjPanel  adjPanel       = new AdjPanel();
                TabPage   tabPageDetails = new TabPage(wf.sWordForm());
                ArrayList al             = m_lexemeToTabs[lexeme];
                al.Add(tabPageDetails);
                tabPageDetails.Controls.Add(adjPanel);
                tabControl.Controls.Add(tabPageDetails);
                ShowLongParticipialForms(adjPanel, lexeme, eoSpLong);
                if (EM_Subparadigm.SUBPARADIGM_UNDEFINED != eoSpShort)
                {
                    ShowShortParticipialForms(adjPanel, lexeme, eoSpShort);
                }
                tabControl.SelectedTab = tabPageDetails;
            }
            else
            {
                MessageBox.Show("No forms available", "Zal Error", MessageBoxButtons.OK);
            }
        }       //  ShowParticipialForms (...)
Exemple #6
0
        }   //  ShowShortParticipialForms (...)

        protected void ShowLongParticipialForms(AdjPanel adjPanel, CLexemeManaged lexeme, EM_Subparadigm eoSpLong)
        {
            CWordFormManaged wf   = null;
            EM_ReturnCode    eRet = (EM_ReturnCode)lexeme.eGetFirstWordForm(ref wf);

            do
            {
                if (!CErrorCode.bError(eRet) && (eoSpLong == wf.eSubparadigm()))
                {
                    string sKey = string.Empty;
                    if (eoSpLong == wf.eSubparadigm() && EM_Number.NUM_SG == wf.eNumber())
                    {
                        sKey = m_hashGender[wf.eGender()];
                    }

                    sKey += m_hashCase[wf.eCase()];
                    sKey += (EM_Number.NUM_SG == wf.eNumber()) ? "Sg" : "Pl";
                    if (EM_Case.CASE_ACC == wf.eCase())
                    {
                        if ((EM_Gender.GENDER_M == wf.eGender() &&
                             EM_Number.NUM_SG == wf.eNumber()) ||
                            (EM_Number.NUM_PL == wf.eNumber()))
                        {
                            sKey += (EM_Animacy.ANIM_YES == wf.eAnimacy()) ? "Anim" : "Inanim";
                        }
                    }

                    string sWordForm = wf.sWordForm();
                    MarkStress(ref sWordForm, wf);

                    adjPanel.SetForm(sKey, sWordForm, wf.eStatus());
                }

                eRet = (EM_ReturnCode)lexeme.eGetNextWordForm(ref wf);
            } while (EM_ReturnCode.H_NO_ERROR == eRet);
        }   //  ShowLongParticipialForms (...)
 public void VerbPanel_ShowParticipialForms(CLexemeManaged lexeme, 
     EM_Subparadigm eoSpLong,
     EM_Subparadigm eoSpShort)
 {
     ShowParticipialForms (lexeme, eoSpLong, eoSpShort);
 }
Exemple #8
0
 public void VerbPanel_ShowParticipialForms(CLexemeManaged lexeme,
                                            EM_Subparadigm eoSpLong,
                                            EM_Subparadigm eoSpShort)
 {
     ShowParticipialForms(lexeme, eoSpLong, eoSpShort);
 }
Exemple #9
0
        }   //  ShowLexemes()

        protected void ShowLexemeDetails(LexemeDataPanel ldpSource)
        {
            CLexemeManaged lexeme = m_hashLexemes[ldpSource];

            try
            {
                lexeme.eGenerateParadigm();
            }
            catch (Exception ex)
            {
                string sMsg = "ShowLexemeDetails: ";
//                MainLib.ZalError err = new MainLib.ZalError();
//                sMsg += err.LastError;
                sMsg += ex.Message;
                MessageBox.Show(sMsg, "Error", MessageBoxButtons.OK);
                return;
            }

            TabPage   tabPageDetails = new TabPage(lexeme.sSourceForm());
            ArrayList al             = m_lexemeToTabs[lexeme];

            al.Add(tabPageDetails);

            string grSt = lexeme.sGraphicStem();

            if ((EM_PartOfSpeech.POS_NOUN == lexeme.ePartOfSpeech()) ||
                (EM_PartOfSpeech.POS_PRONOUN == lexeme.ePartOfSpeech()) ||
                (EM_PartOfSpeech.POS_NUM == lexeme.ePartOfSpeech()))
            {
                NounPanel np = new NounPanel();
                tabPageDetails.Controls.Add(np);
                np.sLexName = grSt;

                CWordFormManaged wf   = null;
                EM_ReturnCode    eRet = (EM_ReturnCode)lexeme.eGetFirstWordForm(ref wf);
                do
                {
                    if (EM_ReturnCode.H_NO_ERROR != eRet)
                    {
                        continue;
                    }
                    string sKey = m_hashCase[wf.eCase()];
                    sKey += (wf.eNumber() == EM_Number.NUM_SG) ? "Sg" : "Pl";

                    string sWordForm = wf.sWordForm();
                    MarkStress(ref sWordForm, wf);
                    np.SetForm(sKey, sWordForm, wf.eStatus());

                    eRet = (EM_ReturnCode)lexeme.eGetNextWordForm(ref wf);
                } while (EM_ReturnCode.H_NO_ERROR == eRet);
            }

            if (EM_PartOfSpeech.POS_ADJ == lexeme.ePartOfSpeech() ||
                EM_PartOfSpeech.POS_PRONOUN_ADJ == lexeme.ePartOfSpeech() ||
                EM_PartOfSpeech.POS_NUM_ADJ == lexeme.ePartOfSpeech())
            {
                AdjPanel ap = new AdjPanel();
                tabPageDetails.Controls.Add(ap);

                CWordFormManaged wf   = null;
                EM_ReturnCode    eRet = (EM_ReturnCode)lexeme.eGetFirstWordForm(ref wf);
                do
                {
                    if (CErrorCode.bError(eRet))
                    {
                        continue;
                    }

                    string sKey = "";
                    if (EM_Subparadigm.SUBPARADIGM_LONG_ADJ == wf.eSubparadigm())
                    {
                        if (EM_Number.NUM_SG == wf.eNumber())
                        {
                            sKey = m_hashGender[wf.eGender()];
                        }
                        sKey += m_hashCase[wf.eCase()];
                        sKey += (EM_Number.NUM_SG == wf.eNumber()) ? "Sg" : "Pl";
                        if (EM_Case.CASE_ACC == wf.eCase())
                        {
                            if ((EM_Gender.GENDER_M == wf.eGender() &&
                                 EM_Number.NUM_SG == wf.eNumber()) ||
                                (EM_Number.NUM_PL == wf.eNumber()))
                            {
                                sKey += (EM_Animacy.ANIM_YES == wf.eAnimacy()) ? "Anim" : "Inanim";
                            }
                        }

                        string sWordForm = wf.sWordForm();
                        MarkStress(ref sWordForm, wf);

                        ap.SetForm(sKey, sWordForm, wf.eStatus());
                    }

                    if (EM_Subparadigm.SUBPARADIGM_SHORT_ADJ == wf.eSubparadigm())
                    {
                        sKey = "Short";
                        if (EM_Number.NUM_SG == wf.eNumber())
                        {
                            sKey += m_hashGender[wf.eGender()];
                        }
                        sKey += m_hashNumber[wf.eNumber()];

                        string sWordForm = wf.sWordForm();
                        MarkStress(ref sWordForm, wf);

                        ap.SetForm(sKey, sWordForm, wf.eStatus());
                    }

                    if (EM_Subparadigm.SUBPARADIGM_COMPARATIVE == wf.eSubparadigm())
                    {
                        sKey = "Comparative";

                        string sWordForm = wf.sWordForm();
                        MarkStress(ref sWordForm, wf);
                        ap.SetForm(sKey, sWordForm, wf.eStatus());
                    }

                    eRet = (EM_ReturnCode)lexeme.eGetNextWordForm(ref wf);
                } while (EM_ReturnCode.H_NO_ERROR == eRet);
            }   //  if (MainLib.EM_PartOfSpeech.POS_ADJ == lexeme.ePartOfSpeech())

            if (EM_PartOfSpeech.POS_VERB == lexeme.ePartOfSpeech())
            {
                VerbPanel vp = new VerbPanel(lexeme);
                SubscribeToVerbEvents(vp);
                tabPageDetails.Controls.Add(vp);
                vp.sLexName = grSt;

                CWordFormManaged wf        = null;
                EM_ReturnCode    eRet      = (EM_ReturnCode)lexeme.eGetFirstWordForm(ref wf);
                string           sWordForm = wf.sWordForm();

                do
                {
                    if (CErrorCode.bError(eRet))
                    {
                        continue;
                    }

                    EM_Subparadigm eSubparadigm = wf.eSubparadigm();
                    switch (eSubparadigm)
                    {
                    case EM_Subparadigm.SUBPARADIGM_PRESENT_TENSE:
                    {
                        string sKey = "Pres" + m_hashPerson[wf.ePerson()];
                        sKey += (wf.eNumber() == EM_Number.NUM_SG) ? "Sg" : "Pl";
                        MarkStress(ref sWordForm, wf);
                        vp.SetForm(sKey, sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_PAST_TENSE:
                    {
                        string sKey = "Past";
                        if (EM_Number.NUM_SG == wf.eNumber())
                        {
                            sKey += m_hashGender[wf.eGender()];
                        }
                        sKey += (wf.eNumber() == EM_Number.NUM_SG) ? "Sg" : "Pl";

                        MarkStress(ref sWordForm, wf);
                        vp.SetForm(sKey, sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_INFINITIVE:
                    {
                        string sKey = "Infinitive";
                        MarkStress(ref sWordForm, wf);
                        vp.SetForm(sKey, sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_IMPERATIVE:
                    {
                        string sKey = "Imperative";
                        sKey += (wf.eNumber() == EM_Number.NUM_SG) ? "Sg" : "Pl";

                        MarkStress(ref sWordForm, wf);
                        vp.SetForm(sKey, sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_PART_PRES_ACT:
                    {
                        string sKey = "PartPresActive";
                        if (wf.eNumber() == EM_Number.NUM_SG &&
                            wf.eGender() == EM_Gender.GENDER_M &&
                            wf.eCase() == EM_Case.CASE_NOM)
                        {
                            MarkStress(ref sWordForm, wf);
                            vp.SetForm(sKey, sWordForm, wf.eStatus());
                        }

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_PART_PAST_ACT:
                    {
                        string sKey = "PartPastActive";
                        if (wf.eNumber() == EM_Number.NUM_SG &&
                            wf.eGender() == EM_Gender.GENDER_M &&
                            wf.eCase() == EM_Case.CASE_NOM)
                        {
                            MarkStress(ref sWordForm, wf);
                            vp.SetForm(sKey, sWordForm, wf.eStatus());
                        }

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_ADVERBIAL_PRESENT:
                    {
                        MarkStress(ref sWordForm, wf);
                        vp.SetForm("PresAdverbial", sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_ADVERBIAL_PAST:
                    {
                        MarkStress(ref sWordForm, wf);
                        vp.SetForm("PastAdverbial", sWordForm, wf.eStatus());

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_PART_PRES_PASS_LONG:
                    {
                        string sKey = "PartPresPassive";
                        if (wf.eNumber() == EM_Number.NUM_SG &&
                            wf.eGender() == EM_Gender.GENDER_M &&
                            wf.eCase() == EM_Case.CASE_NOM)
                        {
                            MarkStress(ref sWordForm, wf);
                            vp.SetForm(sKey, sWordForm, wf.eStatus());
                        }

                        break;
                    }

                    case EM_Subparadigm.SUBPARADIGM_PART_PAST_PASS_LONG:
                    {
                        string sKey = "PartPastPassive";
                        if (wf.eNumber() == EM_Number.NUM_SG &&
                            wf.eGender() == EM_Gender.GENDER_M &&
                            wf.eCase() == EM_Case.CASE_NOM)
                        {
                            MarkStress(ref sWordForm, wf);
                            vp.SetForm(sKey, sWordForm, wf.eStatus());
                        }

                        break;
                    }
                    }   // switch...

                    eRet      = (EM_ReturnCode)lexeme.eGetNextWordForm(ref wf);
                    sWordForm = wf.sWordForm();
                } while (EM_ReturnCode.H_NO_ERROR == eRet);
            }   //  if (EM_PartOfSpeech.POS_VERB == lexeme.ePartOfSpeech())

            tabControl.Controls.Add(tabPageDetails);
            tabControl.SelectedTab = tabPageDetails;
        }   //  ShowLexemeDetails (...)
Exemple #10
0
        }       //  GetDbPath()

        private void ShowLexemes()
        {
            int iNumLexemes = 0;

            if (m_Dictionary.eCountLexemes(ref iNumLexemes) != EM_ReturnCode.H_NO_ERROR)
            {
                MessageBox.Show(this, "Not in the dictionary.", "Zal Synthesizer");
                return;
            }

            TabPage tabPageLexemes = new TabPage(m_sSearchString);

            tabPageLexemes.AutoScroll = true;

            LexemeDataPanel ldpFocused = null;

            int            iLexeme = 0;
            CLexemeManaged lex     = null;
            EM_ReturnCode  eRet    = (EM_ReturnCode)m_Dictionary.eGetFirstLexeme(ref lex);

            do
            {
                if (CErrorCode.bError(eRet))
                {
                    continue;
                }

                if (eRet != EM_ReturnCode.H_NO_ERROR)
                {
                    MessageBox.Show(this, "Unable to retrieve lexeme data.", "Zal Synthesizer");
                    return;
                }

                if (lex.sSourceForm() == m_sSearchString)
                {
                    LexemeDataPanel ldp = new LexemeDataPanel();
                    m_hashLexemes.Add(ldp, lex);
                    SubscribeToLexemeEvents(ldp);
                    ldp.Location      = new System.Drawing.Point(0, iLexeme * ldp.Size.Height + 4);
                    ldp.sInitialForm  = lex.sSourceForm();
                    ldp.sGraphicStem  = lex.sGraphicStem();
                    ldp.iInflectionId = lex.iInflectionId();
                    ldp.sMainSymbol   = lex.sMainSymbol();
                    ldp.sType         = lex.iType().ToString();
                    ldp.sStressType   = (m_hashAccent[lex.eAccentType1()].ToString());
                    if (lex.eAccentType2() != EM_AccentType.AT_UNDEFINED)
                    {
                        ldp.sStressType += "/" + m_hashAccent[lex.eAccentType2()];
                    }

                    tabPageLexemes.Controls.Add(ldp);
                    ldp.Left += 20;
                    ldp.Top  += 20;
                    if (0 == iLexeme)
                    {
                        ldpFocused = ldp;
                    }

                    ArrayList alTabs = new ArrayList();
                    m_lexemeToTabs.Add(lex, alTabs);

                    ++iLexeme;
                }

                eRet = (EM_ReturnCode)m_Dictionary.eGetNextLexeme(ref lex);
            } while (EM_ReturnCode.H_NO_ERROR == eRet);

            tabControl.Controls.Add(tabPageLexemes);
            tabControl.SelectTab(tabPageLexemes);
            ldpFocused.FocusShowButton();
        }   //  ShowLexemes()
        protected void ShowShortParticipialForms(AdjPanel ap, CLexemeManaged lexeme, EM_Subparadigm eoSpShort)
        {
            CGramHasherManaged hasher = new CGramHasherManaged();
            hasher.SetPartOfSpeech(EM_PartOfSpeech.POS_VERB);
            hasher.SetSubparadigm(eoSpShort);
            hasher.SetReflexivity(lexeme.eIsReflexive());
            hasher.SetAspect(lexeme.eAspect());
            hasher.SetNumber(EM_Number.NUM_SG);
            for (EM_Gender eGender = EM_Gender.GENDER_M;
                 eGender < EM_Gender.GENDER_COUNT;
                 ++eGender)
            {
                hasher.SetGender(eGender);
                uint uiForms = lexeme.uiFormCount(hasher.iHash());
                for (uint uiForm = 0; uiForm < uiForms; ++uiForm)
                {
                    CWordFormManaged wf = null;
            //                    lexeme.eWordFormFromHash(hasher.iHash(), lexeme.uiFormCount(hasher.iHash()), ref wf);
                    lexeme.eWordFormFromHash(hasher.iHash(), uiForm, ref wf);
                    string sKey = "Short";
                    sKey += m_hashGender[wf.eGender()];
                    sKey += m_hashNumber[wf.eNumber()];
                    string sWordForm = wf.sWordForm();
                    MarkStress(ref sWordForm, wf);
                    ap.SetForm (sKey, sWordForm, wf.eStatus());
                }
            }

            hasher.SetNumber(EM_Number.NUM_PL);
            hasher.SetGender(EM_Gender.GENDER_UNDEFINED);
            for (uint uiForm = 0; uiForm < lexeme.uiFormCount(hasher.iHash()); ++uiForm)
            {
                CWordFormManaged wf = null;
                lexeme.eWordFormFromHash(hasher.iHash(), uiForm, ref wf);
                string sKey = "Short";
                sKey += m_hashNumber[wf.eNumber()];
                string sWordForm = wf.sWordForm();
                MarkStress(ref sWordForm, wf);
                ap.SetForm(sKey, sWordForm, wf.eStatus());
            }
        }
        protected void ShowParticipialForms(CLexemeManaged lexeme,
            EM_Subparadigm eoSpLong,
            EM_Subparadigm eoSpShort)
        {
            // Expect word forms to be ready by now

            CGramHasherManaged hasher = new CGramHasherManaged();

            hasher.SetPartOfSpeech(EM_PartOfSpeech.POS_VERB);
            hasher.SetSubparadigm(eoSpLong);
            hasher.SetNumber(EM_Number.NUM_SG);
            hasher.SetCase(EM_Case.CASE_NOM);
            hasher.SetGender(EM_Gender.GENDER_M);
            hasher.SetAnimacy(EM_Animacy.ANIM_NO);
            hasher.SetAspect(lexeme.eAspect());
            hasher.SetReflexivity(lexeme.eIsReflexive());

            CWordFormManaged wf = null;
            uint uiForms = lexeme.uiFormCount(hasher.iHash());
            if (uiForms > 0)
            {
                lexeme.eWordFormFromHash(hasher.iHash(), 0, ref wf);
                AdjPanel adjPanel = new AdjPanel();
                TabPage tabPageDetails = new TabPage (wf.sWordForm());
                ArrayList al = m_lexemeToTabs[lexeme];
                al.Add (tabPageDetails);
                tabPageDetails.Controls.Add (adjPanel);
                tabControl.Controls.Add (tabPageDetails);
                ShowLongParticipialForms (adjPanel, lexeme, eoSpLong);
                if (EM_Subparadigm.SUBPARADIGM_UNDEFINED != eoSpShort)
                {
                    ShowShortParticipialForms (adjPanel, lexeme, eoSpShort);
                }
                tabControl.SelectedTab = tabPageDetails;
            }
            else
            {
                MessageBox.Show ("No forms available", "Zal Error", MessageBoxButtons.OK);
            }
        }
        protected void ShowLongParticipialForms(AdjPanel adjPanel, CLexemeManaged lexeme, EM_Subparadigm eoSpLong)
        {
            CWordFormManaged wf = null;
            EM_ReturnCode eRet = (EM_ReturnCode)lexeme.eGetFirstWordForm(ref wf);
            do
            {
                if (!CErrorCode.bError(eRet) && (eoSpLong == wf.eSubparadigm()))
                {
                    string sKey = string.Empty;
                    if (eoSpLong == wf.eSubparadigm() && EM_Number.NUM_SG == wf.eNumber())
                    {
                        sKey = m_hashGender[wf.eGender()];
                    }

                    sKey += m_hashCase[wf.eCase()];
                    sKey += (EM_Number.NUM_SG == wf.eNumber()) ? "Sg" : "Pl";
                    if (EM_Case.CASE_ACC == wf.eCase())
                    {
                        if ((EM_Gender.GENDER_M == wf.eGender() &&
                             EM_Number.NUM_SG == wf.eNumber()) ||
                             (EM_Number.NUM_PL == wf.eNumber()))
                        {
                            sKey += (EM_Animacy.ANIM_YES == wf.eAnimacy()) ? "Anim" : "Inanim";
                        }
                    }

                    string sWordForm = wf.sWordForm();
                    MarkStress(ref sWordForm, wf);

                    adjPanel.SetForm(sKey, sWordForm, wf.eStatus());
                }

                eRet = (EM_ReturnCode)lexeme.eGetNextWordForm(ref wf);

            } while (EM_ReturnCode.H_NO_ERROR == eRet);
        }