Answer Server 26.3
Answer Server Help

# Run Natural Language Generation

You run NLG by sending the NLG action to Answer Server in a POST request method. You submit a JSON object, which contains details of the parts of speech that you want to use to generate a sentence, and the action returns the appropriate sentence.

    curl http://localhost:12000/?action=NLG –F Spec={
      "sentences": [
        {
          "subject": {
            "noun_phrases": [
              { "value": "the dog" },
              { "value": "your giraffe" }
            ]
          },
          "verb": {
            "verb_phrase": {
              "value": "chase",
              "modifiers": [ "quickly" ]
            }
          },
          "object": {
            "noun_phrases": [
              { "value": "the monkey" },
              { "value": "George" },
              { "value": "Martha" }
            ],
            "conjunction": "or"
          }
        }
      ]
    }

This action generates the following sentence:

The dog and your giraffe quickly chase the monkey, George or Martha.

You can retrieve the full schema for the JSON object to use by using the GetResources action. See Find the JSON Schema for Your Update.

Copyright 2016-2026 Open Text
Version 26.3 | Last updated July 2026

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: Knowledge Discovery Answer Server 26.3

Topic Title: Run Natural Language Generation