Esempio n. 1
0
 public CatEntry(string cat)
 {
     if (cat.Equals("verb"))
     {
         verbEntry_ = new VerbEntry();
     }
     else if (cat.Equals("noun"))
     {
         nounEntry_ = new NounEntry();
     }
     else if (cat.Equals("adj"))
     {
         adjEntry_ = new AdjEntry();
     }
     else if (cat.Equals("adv"))
     {
         advEntry_ = new AdvEntry();
     }
     else if (cat.Equals("aux"))
     {
         auxEntry_ = new AuxEntry();
     }
     else if (cat.Equals("modal"))
     {
         modalEntry_ = new ModalEntry();
     }
     else if (cat.Equals("pron"))
     {
         pronEntry_ = new PronEntry();
     }
     else if (cat.Equals("det"))
     {
         detEntry_ = new DetEntry();
     }
 }
Esempio n. 2
0
        /**
         * extract adv information from NIH AdvEntry record, and add to a simplenlg
         * WordElement For now just extract modifier type
         *
         * @param wordElement
         * @param AdvEntry
         */
        private void addAdverbInfo(WordElement wordElement, AdvEntry advEntry)
        {
            bool verbModifier     = false;
            bool sentenceModifier = false;
            bool intensifier      = false;

            List <string> modifications = advEntry.GetModification();

            foreach (string modification in modifications)
            {
                if (modification.StartsWith("verb_modifier", StringComparison.Ordinal))
                {
                    verbModifier = true;
                }
                else if (modification.StartsWith("sentence_modifier", StringComparison.Ordinal))
                {
                    sentenceModifier = true;
                }
                else if (modification.StartsWith("intensifier", StringComparison.Ordinal))
                {
                    intensifier = true;
                }
                // ignore other modification types
            }
            // ignore (for now) other info in record
            wordElement.setFeature(LexicalFeature.VERB_MODIFIER, verbModifier);
            wordElement.setFeature(LexicalFeature.SENTENCE_MODIFIER, sentenceModifier);
            wordElement.setFeature(LexicalFeature.INTENSIFIER, intensifier);
        }
Esempio n. 3
0
        public CatEntryGJdV(LexRecord lexRecord)

        {
            string cat = lexRecord.GetCategory();

            if (cat.Equals("verb"))

            {
                verbEntry_ = new VerbEntry(lexRecord);
            }
            else if (cat.Equals("noun"))

            {
                nounEntry_ = new NounEntry(lexRecord);
            }
            else if (cat.Equals("adj"))

            {
                adjEntry_ = new AdjEntry(lexRecord);
            }
            else if (cat.Equals("adv"))

            {
                advEntry_ = new AdvEntry(lexRecord);
            }
            else if (cat.Equals("aux"))

            {
                auxEntry_ = new AuxEntry(lexRecord);
            }
            else if (cat.Equals("modal"))

            {
                modalEntry_ = new ModalEntry(lexRecord);
            }
            else if (cat.Equals("pron"))

            {
                pronEntry_ = new PronEntry(lexRecord);
            }
            else if (cat.Equals("det"))

            {
                detEntry_ = new DetEntry(lexRecord);
            }
        }