Is there any NLP framework/ algorithm which is able to derive relationships between different entities?
What you describe touches on several tasks in NLP:


semantic role labeling
relationship extraction 
paraphrase detection and textual entaiment


I might not be aware of the recent developments on these tasks, but as far as I know this is a very complex problem for which so far there is no satisfactory solution.