1

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.

martineau
  • 119,623
  • 25
  • 170
  • 301
azhar
  • 351
  • 3
  • 13
  • 1
    This sounds like a "relation extraction" problem. You need to identify numbers that you're interested in (just CNICs I guess?) and then figure out who they're related to. See the Relation Extraction example project and tutorial. https://github.com/explosion/projects/tree/v3/tutorials/rel_component – polm23 Oct 05 '21 at 03:01
  • I am not getting the initial file to run and get the result. will you please guide me to the executable file where ill put my text and get the result? please. – azhar Oct 05 '21 at 08:40

0 Answers0