Exemple #1
0
        /**
         * Creates a new sentence element and adds all of the given components.
         *
         * @param components
         *            a <code>List</code> of <code>NLGElement</code>s that form the
         *            components of this element.
         * @return a <code>DocumentElement</code> representing this sentence
         */

        public DocumentElement createSentence(List <INLGElement> components)
        {
            var sentence = new DocumentElement(new DocumentCategory_SENTENCE(), null);

            sentence.addComponents(components);
            return(sentence);
        }
Exemple #2
0
        /**
         * Creates a new enumerated list element and adds all of the given components in the
         * list
         *
         * @param textComponents
         *            a <code>List</code> of <code>NLGElement</code>s that form the
         *            components of this element.
         * @return a <code>DocumentElement</code> representing the list.
         * @author Rodrigo de Oliveira - Data2Text Ltd
         */

        public DocumentElement createEnumeratedList(List <INLGElement> textComponents)
        {
            var list = new DocumentElement(new DocumentCategory_ENUMERATED_LIST(), null);

            list.addComponents(textComponents);
            return(list);
        }
Exemple #3
0
        /**
         * Creates a new document element with the given title and adds all of the
         * given components in the list
         *
         * @param title
         *            the title of this element.
         * @param components
         *            a <code>List</code> of <code>NLGElement</code>s that form the
         *            components of this element.
         * @return a <code>DocumentElement</code>
         */

        public DocumentElement createDocument(string title, List <INLGElement> components)
        {
            var document = new DocumentElement(new DocumentCategory_DOCUMENT(), title);

            if (components != null)
            {
                document.addComponents(components);
            }
            return(document);
        }
Exemple #4
0
        /**
         * Creates a new section element with the given title and adds all of the
         * given components in the list
         *
         * @param title
         *            the title of this element.
         * @param components
         *            a <code>List</code> of <code>NLGElement</code>s that form the
         *            components of this element.
         * @return a <code>DocumentElement</code> representing the section.
         */

        public DocumentElement createSection(string title, List <INLGElement> components)
        {
            var section = new DocumentElement(new DocumentCategory_SECTION(), title);

            if (components != null)
            {
                section.addComponents(components);
            }
            return(section);
        }
Exemple #5
0
        /**
         * Creates a new paragraph element and adds all of the given components in
         * the list
         *
         * @param components
         *            a <code>List</code> of <code>NLGElement</code>s that form the
         *            components of this element.
         * @return a <code>DocumentElement</code> representing this paragraph
         */

        public DocumentElement createParagraph(List <INLGElement> components)
        {
            var paragraph = new DocumentElement(new DocumentCategory_PARAGRAPH(), null);

            if (components != null)
            {
                paragraph.addComponents(components);
            }
            return(paragraph);
        }