Skip to main content

Convert text to formatted documents

Project description

python.text2doc.com

# Clean up any previous build artifacts
rm -rf build/ dist/ *.egg-info/

# Build the package
python -m pip install --upgrade pip build
pip install --upgrade setuptools

python -m build

# Publish to PyPI (if needed)
python -m pip install --upgrade twine
python -m twine upload dist/*

python -m venv venv
source venv/bin/activate

Clean up the build artifacts and rebuild

rm -rf build/ dist/ src/text2doc.egg-info/
python -m pip install -e .
python -m build

text2doc implements a virtual file system in memory. This module provides an interface compatible with the os module and provides operations on files and directories stored in RAM rather than on disk.

Installation

pip install text2doc

Usage

from text2doc import text2doc

# Example usage
texts = ["This is a sample text.", "Another text to tokenize."]
tokenizer = YourTokenizer()  # Replace with your tokenizer instance
docs = text2doc(texts, tokenizer)
print(docs)

Development

Clean up any previous build artifacts

rm -rf build/ dist/ *.egg-info/

Build the package

python -m pip install --upgrade pip build
python -m build

Publish to PyPI (if needed)

python -m pip install --upgrade twine
python -m twine upload dist/*

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

text2doc-0.1.16.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

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

text2doc-0.1.16-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file text2doc-0.1.16.tar.gz.

File metadata

  • Download URL: text2doc-0.1.16.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for text2doc-0.1.16.tar.gz
Algorithm Hash digest
SHA256 5a9eb3e5f2ed198c21e573a37e9b71caf26c9372b0921350795d75c7d1a7f40e
MD5 3405a11040b530d8c9a63f7106c50eb7
BLAKE2b-256 b897aba994b1465f833015d5f86e64bf1963cdcf296b6e5d71a87e2a31619d40

See more details on using hashes here.

File details

Details for the file text2doc-0.1.16-py3-none-any.whl.

File metadata

  • Download URL: text2doc-0.1.16-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for text2doc-0.1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 aa34fa11aae80c905fbc51399ad9ed79f9d40cdfede217ad9996ec093552b297
MD5 736185486502ef6f28a0d9789bd0fae6
BLAKE2b-256 2fac6b479fa4f63125b8de6bbd67ca465ce526858f133888687bfa709749918f

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