Body: <p>I want to develop a system to generate grammatically correct sentences. The input would be some words. The output would be a grammatically correct human-like sentence.</p>
  <p>Eg:</p>
  <blockquote>
  <p>Input: capital, Paris, France</p>
  </blockquote>
  <blockquote>
  <p>output: Paris is the capital of France</p>
  </blockquote>
  <blockquote>
  <p>Input: cute, cat</p>
  </blockquote>
  <blockquote>
  <p>output: cats are cute</p>
  </blockquote>
  <p>The system adds the missing words such as 'is', 'as', 'are', 'the', 'of', etc.</p>
  <p>How can I build a system like this? My gut feeling is it can be done through Reinforcement Learning by training on a huge corpus like Wikipedia.</p>
  <p>So the states are the individual input words. The reward would be 1 when the sentence is correct and 0 when not. The actions available are taking an individual word available from the input and attaching it to the connecting word (is, of, the..). Then in the second step take the generated word and pick another word from the input and connect it and so on. Stop when all the input words have been used. It's a win when the final sentence is grammatically correct, else fail.</p>
  <p>Ultimately, what I imagine is there will be a knowledge graph. The user asks some questions. Navigating through the knowledge graph, the system will generate some keywords. Then the RL system will take those keywords and construct a human-like sentence.</p>
  <p>I'm totally new to RL. I just finished watching David Silver's 10 part course on RL on YouTube. Any guidance on this topic is much appreciated.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-25T14:04:23.623Z
Comments.Text: DeepCoder (https://openreview.net/pdf?id=ByldLrqlx) uses RL to generate computer code. Its different from natural language, I agree, but it should give you a headstart.
Comments.UserDisplayName: Souradeep Nanda
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-30T16:19:37.697Z
Comments.Text: @SouradeepNanda: Where does DeepCoder user RL? I can see it uses a deep NN and SMT solver . . . but nothing about any RL technique. The term  q(a | E), appears, but I don't think that is an action value?
Comments.UserDisplayName: Neil Slater
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-08-01T15:27:50.423Z
Comments.Text: Sorry, I confused with this one. My bad. https://arxiv.org/abs/1706.05125
Comments.UserDisplayName: Souradeep Nanda
Tags: <reinforcement-learning><natural-language-processing>
Title: RL to generate sentences
UserDisplayName: MD Luffy
ThreadText: # RL to generate sentences
  
  (Asked by: username_0 on 2017-04-22)
  
  I want to develop a system to generate grammatically correct sentences. The input would be some words. The output would be a grammatically correct human-like sentence.
  
  Eg:
  
  > Input: capital, Paris, France
  
  > output: Paris is the capital of France
  
  > Input: cute, cat
  
  > output: cats are cute
  
  The system adds the missing words such as 'is', 'as', 'are', 'the', 'of', etc.
  
  How can I build a system like this? My gut feeling is it can be done through Reinforcement Learning by training on a huge corpus like Wikipedia.
  
  So the states are the individual input words. The reward would be 1 when the sentence is correct and 0 when not. The actions available are taking an individual word available from the input and attaching it to the connecting word (is, of, the..). Then in the second step take the generated word and pick another word from the input and connect it and so on. Stop when all the input words have been used. It's a win when the final sentence is grammatically correct, else fail.
  
  Ultimately, what I imagine is there will be a knowledge graph. The user asks some questions. Navigating through the knowledge graph, the system will generate some keywords. Then the RL system will take those keywords and construct a human-like sentence.
  
  I'm totally new to RL. I just finished watching David Silver's 10 part course on RL on YouTube. Any guidance on this topic is much appreciated.
  
  **Tags:** reinforcement-learning, natural-language-processing
  
  > **Comments:**
  > **username_1**: DeepCoder (https://openreview.net/pdf?id=ByldLrqlx) uses RL to generate computer code. Its different from natural language, I agree, but it should give you a headstart.  
  > **username_2**: @username_1: Where does DeepCoder user RL? I can see it uses a deep NN and SMT solver . . . but nothing about any RL technique. The term  q(a | E), appears, but I don't think that is an action value?  
  > **username_1**: Sorry, I confused with this one. My bad. https://arxiv.org/abs/1706.05125  
  
  ---
  
  ## 0 answers
  
  