Here i share my code
main.py
from fitz import fitz
import spacy
location = "D:\python\Resume-Sample.pdf"
text = ''
with fitz.open(str(location)) as doc:
for page in doc:
text+=page.get_text("block")
NER = spacy.load("en_core_web_sm")
text1 = NER(text)
for word in text1.ents:
print(word.text, word.label_)
Result
:Abdul Moeez :E-mail- amoeez14@gmail.com : Phone +1111111111 : Address Karachi, Sindh, Pakistan
How i make and train a model so it recognizes Name Email Phone Address