コード例 #1
0
 /**
  * A helper method to set the head feature of the phrase.
  *
  * @param phraseElement
  *            the phrase element.
  * @param headElement
  *            the head element.
  */
 private void setPhraseHead(PhraseElement phraseElement, NLGElement headElement)
 {
     if (headElement != null)
     {
         phraseElement.setHead(headElement);
         headElement.Parent = phraseElement;
     }
 }
コード例 #2
0
        /**
         * A helper method for setting the complement of a phrase.
         *
         * @param phraseElement
         *            the created element representing this phrase.
         * @param complement
         *            the complement to be added.
         */
        private void setComplement(PhraseElement phraseElement, object complement)
        {
            NLGElement complementElement = createNLGElement(complement);

            phraseElement.addComplement(complementElement);
        }