private static void AddVerbExceptSuruKuruDictionaryEntry(WordInformation word, Database dictionary, Dictionary <int, JmdictEntity> entries, string conjungation)
        {
            List <JmdictEntity> list;

            if (word.IsBaseForm())
            {
                list = JmdictEntity.GetJapMatchWordAndPOS(word.BaseForm, dictionary, JmdictEntity.POS_VERB_EXCEPT_SURU_KURU);
                AddDictionaryEntry(list, entries, conjungation);
                return;
            }
            else if (word.IsGodanConjugation())
            {
                list = JmdictEntity.GetJapMatchWordAndPOS(word.BaseForm, dictionary, JmdictEntity.POS_VERB_GODAN_EXCEPT_SURU_KURU);
                AddDictionaryEntry(list, entries, conjungation);
                AddPossibleSpecialSuruVerb(word, dictionary, conjungation, entries);
                return;
            }
            else if (word.IsIchidanConjugation())
            {
                list = JmdictEntity.GetJapMatchWordAndPOS(word.BaseForm, dictionary, JmdictEntity.POS_VERB_ICHIDAN_EXCEPT_SURU_KURU);
                AddDictionaryEntry(list, entries, conjungation);
                return;
            }
            else if (word.BaseForm.EndsWith("する") || word.BaseForm.EndsWith("くる") || word.BaseForm.EndsWith("来る"))
            { //Special Suru Verb
                list = JmdictEntity.GetJapMatchVerb(word.BaseForm, dictionary);
                AddDictionaryEntry(list, entries, conjungation);
                return;
            }
        }
Exemplo n.º 2
0
        private static bool IsValidVerb(WordInformation word)
        {
            if (!word.IsVerb())
            {
                return(false);
            }

            if (word.IsBaseForm())
            {
                return(true);
            }

            if (!String.IsNullOrWhiteSpace(word.Conjugation))
            {
                return(true);
            }

            return(false);
        }