title: How do I extract a sequence of contiguous prespecified words from a list?
body: <p>I have two lists given:</p>
  <blockquote>
  <p><code>list_1</code> is a list of words which I'm interested in<br />
  <code>list_2</code> is a tokenized sequence of words extracted from text</p>
  </blockquote>
  <p>What I want to do is to extract sequences of words out of <code>list_2</code> if they are contained in <code>list_1</code> and concatenate them as long as the following word in <code>list_2</code> is also contained in <code>list_1</code>.</p>
  <p>Unfortunately I don't quite know how to start. Any tipp would be much appreciated.</p>
  <p>Best regards!</p>