I am trying to find a specific subject that belongs to an object from an article. like:
text = "Masood Azhar was killed by Imran Raza holding number 03213216544. the news was published on the website on 2021"
who's number is?
text = "Masood Azhar was killed by Imran Raza was living in the USA. the news was published on the website on 2021"
who was living in the USA?
text = "Masood Azhar was killed by Imran Raza and Ghulam Jafari holding CNIC 2652-6523652-8. the news was published on the website on 2021"
who's CNIC is?
I have used spacy
from their documentation used sentences and tokenizer but I did not find anything which is my need to find the number given in the text variable but there are two names in that variable. how can I find whose number is this between "Masood Azhar" and "Imran Raza"
Grammatically it's masood azhar number, right?
But there will be many situations like will be a number, CNIC, address between three or more person. will be a CNIC at the end of the sentence with a person's name at the end and so on. but my task is to find the number, CNIC, address and other related between two or three person who's CNIC is? who's number is? who's address is? etc.