Answers.Body: <p>Look at MUMBLE, which is a kind of transducer working from Conceptual Dependency structures (which are similar to what you've got) and produce English output.</p>
  
  <p>A Lisp implementation of Meehan's TALESPIN program, which includes a simplified version of MUMBLE can be found here: <a href="https://github.com/lispm/CommonLispCode/blob/master/micro-talespin.lisp" rel="nofollow noreferrer">https://github.com/lispm/CommonLispCode/blob/master/micro-talespin.lisp</a> -- the generator part starts at about line 1030. It should be easy to follow, even if you do not know Lisp.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-04T14:01:34.463Z
Answers.LastActivityDate: 2017-09-04T14:01:34.463Z
Answers.UserDisplayName: Oliver Mason
Answers.Body: <p>It might be simpler to generate the language output yourself since you've already got a concrete concept structure in code.</p>
  
  <p>Maybe you'll also want to be aware of potential future applications such as parsing your own output back to the inputs.</p>
  
  <p>With that said, you could investigate Markov Chains or Google around a bit for Natural Language Processing and Natural Language Generation.</p>
  
  <p><a href="https://stackoverflow.com/questions/33068943/library-for-generating-natural-language-verbs-in-javascript">https://stackoverflow.com/questions/33068943/library-for-generating-natural-language-verbs-in-javascript</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-18T11:54:21.213Z
Answers.Text: I understand, however I'm creating a proof of concept and this problem has been solved before so I don't want to solve it from scratch or invent my own solution, I was wondering if there was some library that was ready to solve this sort of issues or efficient method.
Answers.UserDisplayName: Onza
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-18T10:19:41.843Z
Answers.LastActivityDate: 2017-04-18T10:19:41.843Z
Answers.LastEditDate: 2017-05-23T12:39:33.010Z
Answers.UserDisplayName: razodactyl
Body: <p>I have a group of structures in a program that are very specific on their meaning, eg. this is a piece of code</p>
  
  <pre><code>randomItem = objects.concept.random("buyable")
  idea.example(objects.concept.random("family", "friend")).does({
      action: "go",
      target: object.concent.random("shop")
  }).then({
      action: "buys",
      target: randomItem,
      several: true
  }).then({
      question: true,
      action: "know",
      property: "amount",
      target: randomItem,
      several: true
  })
  </code></pre>
  
  <p>I have worked with natural language parsers before.</p>
  
  <p>How do I go and transform this to Natural Language (the other way around), is there any way or method; I have logical structures in which I know who is the subject, what the verb and target.</p>
  
  <p>Which methods can I use to generate language from this?</p>
  
Tags: <natural-language-processing>
Title: How can I generate natural language sentences given logical structures that contain the subject, verb and target?
UserDisplayName: Onza
ThreadText: # How can I generate natural language sentences given logical structures that contain the subject, verb and target?
  
  (Asked by: username_0 on 2017-04-16)
  
  I have a group of structures in a program that are very specific on their meaning, eg. this is a piece of code
  randomItem = objects.concept.random("buyable")
  idea.example(objects.concept.random("family", "friend")).does({
      action: "go",
      target: object.concent.random("shop")
  }).then({
      action: "buys",
      target: randomItem,
      several: true
  }).then({
      question: true,
      action: "know",
      property: "amount",
      target: randomItem,
      several: true
  })
  
  I have worked with natural language parsers before.
  How do I go and transform this to Natural Language (the other way around), is there any way or method; I have logical structures in which I know who is the subject, what the verb and target.
  Which methods can I use to generate language from this?
  
  **Tags:** natural-language-processing
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-09-04. Score: 1
  
  Look at MUMBLE, which is a kind of transducer working from Conceptual Dependency structures (which are similar to what you've got) and produce English output.
  
  A Lisp implementation of Meehan's TALESPIN program, which includes a simplified version of MUMBLE can be found here: <https://github.com/lispm/CommonLispCode/blob/master/micro-talespin.lisp> -- the generator part starts at about line 1030. It should be easy to follow, even if you do not know Lisp.
  
  
  ---
  
  ### Answer by username_2 on 2017-04-18. Score: 1
  
  It might be simpler to generate the language output yourself since you've already got a concrete concept structure in code.
  
  Maybe you'll also want to be aware of potential future applications such as parsing your own output back to the inputs.
  
  With that said, you could investigate Markov Chains or Google around a bit for Natural Language Processing and Natural Language Generation.
  
  <https://stackoverflow.com/questions/33068943/library-for-generating-natural-language-verbs-in-javascript>
  
  > **Comments:**
  > **username_0**: I understand, however I'm creating a proof of concept and this problem has been solved before so I don't want to solve it from scratch or invent my own solution, I was wondering if there was some library that was ready to solve this sort of issues or efficient method.  
  
  ---
  
  