title: Identify irrelevant queries based on context
body: <p>I'm working on keyphrase extraction from individual queries using R/Python. </p>
  
  <p>However, is there any way I can detect whether the query is valid in a particular context or not ? 
  Find an example scenario here:</p>
  
  <pre><code>Query1 = 'I need to order a birthday cake. Cherry topped vanilla cream over chocolate.'
  Query2 = 'I wish to have a butterscotch cake with caramel sauce on top.'
  Query3 = 'I need to throw my chocolate wrapper into the dustbin.'
  </code></pre>
  
  <p>Assuming the context is Cake customization, let's say <code>Query1</code>, <code>Query2</code> are valid, but <code>Query3</code> is not. <code>Query3</code> is clearly not about cake customization, while the first two queries are about cake customization.</p>
  
  <p>If I want to eliminate the invalid queries prior to my key-phrase extraction step. Any help in the approach to be taken is welcome. </p>
  
  <p>Thanks!</p>