Skip to main content

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)

Release files for text-extra 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for text-extra 0.1.4
File Size Uploaded
text-extra-0.1.4.tar.gz 42.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for text-extra 0.1.4
File Interpreter ABI Platform
text_extra-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 71.7 kB

Release files / text-extra-0.1.4.tar.gz

Download URL text-extra-0.1.4.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e7240afe739ef12a2158be023714ef567714a965b649df26b92a79411b5eb9e9
BLAKE2b-256 checksum
How to use checksums
1acf8008d6578e25bd876ecda0aaf49886a6fc2955a068ab916a968ca347f129
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / text_extra-0.1.4-py3-none-any.whl

Download URL text_extra-0.1.4-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bf4f37bf619a53c699b8588a99429d8c486cedab0a210f2a00713d321476fa2
BLAKE2b-256 checksum
How to use checksums
d8d07ed43c10a7c37e064ed54d3775664e93fcd62cbec09284510cf2b8240018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page