I'm speculating that this is very much known in NLP, but as I've not studied NLP, I don't know what concepts are related to this:
Basically I have entities that are connected by some strings. I want to do semantic analysis using this kind of constructs. I.e. by checking whether a given sentence has entities (the yellow ellipses) connected with the right strings.
Notice that this is also basically describable as a a deterministic context-free language. But I'd like to understand the semantical aspect of this, rather than mere parsing (string matching).