예제 #1
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 (...)
예제 #2
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 (...)
예제 #3
0
        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());
            }
        }
예제 #4
0
        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);
            }
        }