├── .DS_Store ├── README.md └── setup.py /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobsomer/py-pdf-search/cdec328cb6ca1cc92e859d3dd03c937a55d0757d/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # `py-pdf-search` 2 | 3 | ## A python library for indexing and querying PDFS with a few lines of code. 4 | 5 | `py-pdf-search` is a powerful Python library developed specifically for indexing and querying PDF documents, making it an ideal solution for patent search tasks. 6 | 7 | Here are two examples demonstrating the usage of PY-PDF-SEARCH: 8 | 9 | ### Example 1: NLP Search 10 | 11 | ```python 12 | from pdfagent import PDFAgent 13 | import os 14 | 15 | if __name__ == "__main__": 16 | agent = PDFAgent( 17 | "path/to/pdf_files", 18 | "openAIKEY" 19 | ) 20 | 21 | res= agent.search("Find patent filings related to secure and scalable filing systems for medical records.") 22 | print(res) 23 | ``` 24 | 25 | ### Example 2: Cosign Similarity Search 26 | 27 | ```python 28 | from pdfagent import PDFAgent 29 | import os 30 | 31 | if __name__ == "__main__": 32 | agent = PDFAgent( 33 | "path/to/pdf_files", 34 | "openAIKEY" 35 | ) 36 | 37 | res= agent.cosign_similarity("", k=3) 38 | print(res) 39 | ``` 40 | 41 | ### Checkout the Presentation Here [Presentation Link](https://docs.google.com/presentation/d/1VKtHyzxR18cRrQyVJc_gwY57BEw4znUJzhIeSzXjH94/edit?usp=sharing) 42 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import find_packages, setup 2 | from os import path 3 | 4 | # The directory containing this file 5 | HERE = path.abspath(path.dirname(__file__)) 6 | 7 | with open(path.join(HERE, 'README.md'), encoding='utf-8') as f: 8 | long_description = f.read() 9 | 10 | setup( 11 | name='py-pdf-search', 12 | packages=find_packages(include=["langchain[all]","pypdf","openai", "tiktoken"]), 13 | long_description=long_description, 14 | long_description_content_type="text/markdown", 15 | version='0.1.0', 16 | description='A Python library for searching PDFs', 17 | author='Jacob Somer', 18 | license='MIT', 19 | ) --------------------------------------------------------------------------------