What is this called by gathering the meaning from a sentence? What would this process of gathering the meaning of a sentence be called? What would the segments derived from the sentence be called?

"John and Derrek both love cake"
    -&gt; John loves cake
    -&gt; Derrek loves cake

"John was mad that the weather was rainy today"
     -&gt; John was mad
     -&gt; weather was rainy today
It is called relation extraction, it is a subdomain of Natural Language Processing. Often, you first have to apply Named Entity recognition or Concept extraction to extract the entity or concept. You can then extract the relations betweens the entities with several approaches.