예제 #1
0
        /**
         * Adds a <em>do</em> verb to the realisation of this clause.
         *
         * @param phrase
         *            the <code>PhraseElement</code> representing this clause.
         * @param parent
         *            the parent <code>SyntaxProcessor</code> that will do the
         *            realisation of the complementiser.
         * @param realisedElement
         *            the current realisation of the clause.
         * @param phraseFactory
         *            the phrase factory to be used.
         */

        private static void addDoAuxiliary(PhraseElement phrase,
                                           SyntaxProcessor parent,
                                           NLGFactory phraseFactory,
                                           ListElement realisedElement)
        {
            PhraseElement doPhrase = phraseFactory.createVerbPhrase("do");

            doPhrase.setFeature(Feature.TENSE.ToString(), phrase.getFeatureTense(Feature.TENSE.ToString()));
            doPhrase.setFeature(Feature.PERSON.ToString(), phrase.getFeature(Feature.PERSON.ToString()));
            doPhrase.setFeature(Feature.NUMBER.ToString(), phrase.getFeature(Feature.NUMBER.ToString()));
            realisedElement.addComponent(parent.realise(doPhrase));
        }
예제 #2
0
        /**
         * create an empty clause
         */

        public SPhraseSpec(NLGFactory phraseFactory) : base(new PhraseCategory_CLAUSE())
        {
            base.setFactory(phraseFactory);
            // create VP
            setVerbPhrase(phraseFactory.createVerbPhrase());

            // set default values
            setFeature(Feature.ELIDED.ToString(), false);
            setFeature(InternalFeature.CLAUSE_STATUS.ToString(), ClauseStatus.MATRIX);
            setFeature(Feature.SUPRESSED_COMPLEMENTISER.ToString(), false);
            setFeature(LexicalFeature.EXPLETIVE_SUBJECT, false);
            setFeature(Feature.COMPLEMENTISER.ToString(), phraseFactory.createWord(
                           "that", new LexicalCategory_COMPLEMENTISER()));
        }