Skip to main content

A simple tool for text extraction from pdf, epub, txt, and docx files

Project description

extractText

A simple tool for extracting text from PDF, EPUB, TXT, and DOCX files. This library was primarily developed for personal use in various NLP-related projects.

Parsers used:

pdfplumber, pytesseract, PyPDF2, pdf2image and PIL for PDF processing

ebooklib, bs4 for EPUB

docx for DOCX

Installation

Install text-extra using pip:

pip install text-extra

Usage

extracted_text = extract_text(file_path)
if isinstance(extracted_text, dict):
    for key, value in extracted_text.items():
        print(f"--- {key} ---\n{value}\n")
else:
    print(extracted_text)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

text-extra-0.1.4.tar.gz (42.5 kB view hashes)

Uploaded Source

Built Distribution

text_extra-0.1.4-py3-none-any.whl (29.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page