How to extract parameters from a text using AI/NLP lets say I have three texts:

&quot;make a heading that says hello word&quot;
&quot;make a heading of hello world&quot;
&quot;create heading consist of hello world&quot;

How can I fetch those groups of words using AI which is referring to heading i.e hello world in this case. Which AI frameworks or libraries can do that?
in all examples heading is pointing to hello world (which i am referring as group of words). so basically i want those words which will be a part of heading or in other word there is a relationship between them. another example i can give is &quot;I am watching Breaking bad&quot; so there is a relationship between watching and breaking bad and i want to extract what are you watching.
What's the best approach? Do I have to train a model for that or there are some other techniques that can get it done?
I think U are looking for PLSA
for PLSA either U find out those topics(catogeries) with EM or NNMF
Personally I recommend NNMF
or u can use LDA which is Bayesian version of PLSA
here is code for PLSA:
https://github.com/Man-ash/Probabilistic-Latent-semantic-analysis
which use NNMF
for EM method I code it by myself but i am not sure if it is right
https://stackoverflow.com/questions/65783880/problem-about-m-step-in-probabilistic-latent-semantic-analysis-with-code