Extracting content from spesific address books
Project description
historical-text-extraction (hte)
Package to extract text from historical documents. The package is written for personal use.
Installation
The current release from the PyPI repository:
pip install hte
The development version from GitHub with:
pip install git+ssh://git@github.com/eirikberger/hte.git
Note that it is nessecary with a SSH key for this approach to work.
Using it
Import the package
from hte import digitize
The basic setup is the following:
# Define class
book = digitize.Book("data/finnmark_1968.pdf", "books")
# Run methods on the class
book.CreateFolderStructure()
book.PdfImport(page_info=False, from_page=21, to_page=263)
book.Split(multiple_columns=True)
book.RunOCR(type="splits", export_image=False)
book.CombineCleanGroup(ocr_grouping=True, group_type='norway')
book.RegexStructure("norway")
Make sure to install the correct language package for Tesseract.
# Check languages already installed:
tesseract --list-langs
# Languages available for installation
apt-cache search tesseract-ocr
# Install the Norwegian language pack
sudo apt-get install tesseract-ocr-nor
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hte-0.0.8.tar.gz
(11.5 kB
view details)
Built Distribution
hte-0.0.8-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file hte-0.0.8.tar.gz
.
File metadata
- Download URL: hte-0.0.8.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef278eb9a2cb3e594a7a3e42aa4401047e58e715642f08862cad228f38a12993 |
|
MD5 | cb331722802d57203950690b4ade8d04 |
|
BLAKE2b-256 | 68fe35d52c7aa634d1b3562c295d078fb3d75576d38348e2cf98e3de56966e32 |
File details
Details for the file hte-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: hte-0.0.8-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acf7fa443988ea4a969d41f2412ed5f7fcf7663233c4bdee16bbec551943bcde |
|
MD5 | 458a6906271d073fc27003a8889c66f6 |
|
BLAKE2b-256 | 9d6ad6ab1c7db86bc8294f56407167164de2ee390208126aa4f9cfc35562d6ea |