Enables real-world data collection, bridges the gap between OCR and NLP, enabling you to convert text from any image to ready to use nlp data structures.
Project description
pic2prose
A package that can take in images and build a corpus and produce nlp datastructures for direct use in experimentation and model training.
Take any image with text, use p2p to generate NLP datastructures ready for use in fine-tuning LLM's, generating embeddings, sentiment classification, etc.
Installation
pip install pic2prose
Open up your favorite editor, import, and build a robust corpus.
from pic2prose.structures import *
# initialize the object
# may take longer if you're not using a GPU
corpus = Corp(image_path="ex1.png")
# generate co-occurrence matrix
corpus.get_co_occurrence_matrix()
# generate tf-idf matrix
corpus.get_tfidf_matrix()
# one-hot encodings
corpus.one_hot_encode()
Coming Soon
Support for building corpi from URL
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pic2prose-0.0.2.tar.gz.
File metadata
- Download URL: pic2prose-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6738f67247805f53325aa140999c2073fabc46bfaa552139fa01dc46c14f8984
|
|
| MD5 |
999d9cc68db96c98e83eaf68d42e7070
|
|
| BLAKE2b-256 |
9296b5153f18a6170b8c3494e13f3fe69cee953a1ddbb413168684b8e8144f27
|
File details
Details for the file pic2prose-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pic2prose-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74c80581b289a18e4cd3fc9f05137f6ba35e588ef2029feb8a13335e50521d27
|
|
| MD5 |
fffb41f158cd904e12bacced79a12bca
|
|
| BLAKE2b-256 |
5b112370c3e43945cd8776f3774f2ac5173de108d46a43b04b7fc8d32a1775a7
|