Answer of 50 mark for university post graduate theory exam , Question : Role of viruses in periodontal diseases . Use uploaded references. Add 3-4 landmark and important study articles.

Reading File
Now I'll extract content from all PDFs in parallel and search PubMed simultaneously.
Running Command

python3 << 'EOF' from pypdf import PdfReader files = { "viral_periodontal": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/Periodontal problems asso with viral infections.pdf", "samaranayake_viruses": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/viruses related to dentistry samaranayake.pdf", "NUP": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/NUP.pdf", } for name, path in files.items(): try: reader = PdfReader(path) print(f"\n{'='*60}") print(f"FILE: {name} | Pages: {len(reader.pages)}") print('='*60) text = "" for page in reader.pages: text += page.extract_text() + "\n" # Print first 4000 chars print(text[:5000]) except Exception as e: print(f"ERROR reading {name}: {e}") EOF

Running Command

python3 << 'EOF' from pypdf import PdfReader files = { "lindhe_5th": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/lindhe 5th edition.pdf", "biofilm_microbiology": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/Biofilm and periodontal microbiology.pdf", "lindhe_calculus": "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/lindhe calculus plaque.pdf", } for name, path in files.items(): try: reader = PdfReader(path) print(f"\n{'='*60}") print(f"FILE: {name} | Pages: {len(reader.pages)}") print('='*60) text = "" for page in reader.pages: text += page.extract_text() + "\n" print(text[:4000]) except Exception as e: print(f"ERROR reading {name}: {e}") EOF

Searching PubMed

viruses periodontal disease herpesviruses

Finding Sources
Now let me get the full content of the most relevant uploaded files and fetch key PubMed abstracts in parallel.
Running Command

python3 << 'EOF' from pypdf import PdfReader path = "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/Periodontal problems asso with viral infections.pdf" reader = PdfReader(path) text = "" for page in reader.pages: text += page.extract_text() + "\n" # Print pages 2-end (skip TOC intro already captured) print(text[5000:14000]) EOF

Running Command

python3 << 'EOF' from pypdf import PdfReader path = "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/viruses related to dentistry samaranayake.pdf" reader = PdfReader(path) text = "" for page in reader.pages: text += page.extract_text() + "\n" # Print middle section (herpesviruses, EBV, CMV, HIV) print(text[4000:12000]) EOF

Reading Article

PMID: 35612796

Reading Article

PMID: 31850623

Running Command

python3 << 'EOF' from pypdf import PdfReader path = "/home/daytona/workspace/attachments/dc65988d-fc71-45f9-81df-a143275d236d/Periodontal problems asso with viral infections.pdf" reader = PdfReader(path) text = "" for page in reader.pages: text += page.extract_text() + "\n" # Get the herpesvirus / EBV / CMV / HIV section print(text[14000:24000]) EOF

Reading Article

PMID: 10791704

Reading Article

PMID: 34463985

Searching PubMed

Epstein-Barr virus cytomegalovirus periodontal pockets subgingival

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.