title: Parsing raw text and extracting object mentions and the 'and', 'or' relation between them given a predefined set of objects
body: <p>I have a predefined list of objects such as </p>
  
  <pre><code>["pop", "pizza", "orange juice", "apple juice", "pasta", "taco", ...]
  </code></pre>
  
  <p>I'm given a raw text asking for these objects such as </p>
  
  <pre><code>Buy a pizza for me and a pasta for my friend. Also buy me a pop, an orange juice, or an apple juice.
  </code></pre>
  
  <p>I would like to extract the objects mentioned in the text as well as the 'and', 'or' relationship between them. E.g., for the example above, I need the output to be something like:</p>
  
  <pre><code>[["pizza"], ["pasta"], ["pop", "orange juice", "apple juice"]]
  </code></pre>
  
  <p>showing the text is asking for pizza, pasta, and at least one object from (pop, orange juice, apple juice). i.e., the text is looking for (pizza AND pasta AND (pop OR orange juice OR apple juice)). There can be several variations in the raw text. </p>
  
  <p>I was looking at parsing and nlp techniques, but could not find anything helpful. I appreciate any help or pointer.</p>