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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file text-extra-0.1.4.tar.gz.

File metadata

  • Download URL: text-extra-0.1.4.tar.gz
  • Upload date:
  • Size: 42.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for text-extra-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e7240afe739ef12a2158be023714ef567714a965b649df26b92a79411b5eb9e9
MD5 0a9894943865e24961b13078a87e23f4
BLAKE2b-256 1acf8008d6578e25bd876ecda0aaf49886a6fc2955a068ab916a968ca347f129

See more details on using hashes here.

File details

Details for the file text_extra-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: text_extra-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for text_extra-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6bf4f37bf619a53c699b8588a99429d8c486cedab0a210f2a00713d321476fa2
MD5 558f94e6a7c644d40d716b2a7d026942
BLAKE2b-256 d8d07ed43c10a7c37e064ed54d3775664e93fcd62cbec09284510cf2b8240018

See more details on using hashes here.

Supported by

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