Answers.Body: <p>This seems tricky. It seems that any "surface level" transformation wouldn't give adequate results and any working solution would need to properly capture the sentence structure, and generate a gramatically correct transformed sentence.</p>
  
  <p>One possible option is to use a "traditional pipeline" - e.g. you run a NLP pipeline up to syntactic parsing, which for general domain english is quite accurate (you'd need some special handling for the gap "____" part though), then implement some heuristic rules to transform the syntax tree, and regenerate a sentence from the transformed tree. There are a lot of publications about similar transformations in machine translation domain, used as a way to preprocess data before running statistical machine translation for language pairs with very different word(or sentence part) ordering.</p>
  
  <p>A second option that may work is to look into the field of controlled natural languages, or something like <a href="http://www.grammaticalframework.org/" rel="nofollow noreferrer">http://www.grammaticalframework.org/</a> that can be used as a toolkit to help generating new sentences.</p>
  
  <p>Current fashion also suggests a very different option that <em>might</em> work - you <em>could</em> train a character-level recurrent neural network with an attention mechanism (look into recent neural machine translation publications for details) to do this transformation, but I'm not sure of how much training data it will need for decent accuracy.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-11T17:16:30.460Z
Answers.LastActivityDate: 2017-01-12T07:23:27.530Z
Answers.LastEditDate: 2017-01-12T07:23:27.530Z
Answers.UserDisplayName: Peteris
Body: <p>I was wondering if in any way it is possible to generate <span class="math-container">$n$</span> questions based on gap-fill-in type questions.</p>
  <p>For example, the following template</p>
  <blockquote>
  <p>______ is a process in which plants generate energy.</p>
  </blockquote>
  <p>could lead to the generation of the following specific question</p>
  <blockquote>
  <p>What is the process in which plants generate energy called?</p>
  </blockquote>
  <p>If so, how can I achieve this?</p>
  <p>I am familiar with and used natural language processing techniques, and have no problem with implementing an algorithm for this, but I do not know where to start with this.</p>
  
Tags: <machine-learning><natural-language-processing>
Title: How can I generate "what", "why" and "who" types of questions from question templates?
UserDisplayName: Taichi Kato
ThreadText: # How can I generate "what", "why" and "who" types of questions from question templates?
  
  (Asked by: username_0 on 2017-01-11)
  
  I was wondering if in any way it is possible to generate $n$ questions based on gap-fill-in type questions.
  
  For example, the following template
  
  > \_\_\_\_\_\_ is a process in which plants generate energy.
  
  could lead to the generation of the following specific question
  
  > What is the process in which plants generate energy called?
  
  If so, how can I achieve this?
  
  I am familiar with and used natural language processing techniques, and have no problem with implementing an algorithm for this, but I do not know where to start with this.
  
  **Tags:** machine-learning, natural-language-processing
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-11. Score: 3 | Accepted answer
  
  This seems tricky. It seems that any "surface level" transformation wouldn't give adequate results and any working solution would need to properly capture the sentence structure, and generate a gramatically correct transformed sentence.
  
  One possible option is to use a "traditional pipeline" - e.g. you run a NLP pipeline up to syntactic parsing, which for general domain english is quite accurate (you'd need some special handling for the gap "\_\_\_\_" part though), then implement some heuristic rules to transform the syntax tree, and regenerate a sentence from the transformed tree. There are a lot of publications about similar transformations in machine translation domain, used as a way to preprocess data before running statistical machine translation for language pairs with very different word(or sentence part) ordering.
  
  A second option that may work is to look into the field of controlled natural languages, or something like <http://www.grammaticalframework.org/> that can be used as a toolkit to help generating new sentences.
  
  Current fashion also suggests a very different option that *might* work - you *could* train a character-level recurrent neural network with an attention mechanism (look into recent neural machine translation publications for details) to do this transformation, but I'm not sure of how much training data it will need for decent accuracy.
  
  
  ---
  
  