Skip to main content

Generate structured JSON metadata for up to 5000 characters of text.

Project description

semantic-bit

Generate lightweight JSON metadata for short text snippets (up to 5000 characters).

Installation

pip install semantic-bit

Python usage

from semantic_bit import analyze_text, analyze_text_as_json

payload = analyze_text("Hello semantic world!")
print(payload)
# {'character_count': 23, 'trimmed_character_count': 23, ...}

json_payload = analyze_text_as_json("Hello semantic world!")
print(json_payload)

Command line interface

semantic-bit "Your content here"

# Or from a file
semantic-bit --file path/to/document.txt

The CLI returns a JSON object describing the text. Use --no-indent to emit a compact payload.

Developing

python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
pytest

On Windows PowerShell, activate the environment with .venv\Scripts\Activate.ps1.

Publishing to PyPI

  1. Ensure the version in pyproject.toml is bumped appropriately.
  2. Build the package (install build backend first: pip install build twine):
    python -m build
    
  3. Upload to PyPI (replace pypi with testpypi for a dry run):
    python -m twine upload dist/*
    

To install the package from TestPyPI for validation:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple semantic-bit

License

MIT

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

semantic_bit-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

semantic_bit-0.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file semantic_bit-0.1.0.tar.gz.

File metadata

  • Download URL: semantic_bit-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for semantic_bit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 41981ed5c139039e7638689a7d1cd1a9ea5f456216701f8ac30fc09b92fb1231
MD5 2409d9c5d8d8160d3a3a4ea44b6f757b
BLAKE2b-256 f517332796095810aeeb9ddd1697102442d1764a91ca6b6db4a16024a7e8cec2

See more details on using hashes here.

File details

Details for the file semantic_bit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: semantic_bit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for semantic_bit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3d39244426d38084b83a338a0b36e16b1b2e2d6818df644c1de04d46af9362d
MD5 fd50f42c65b4acc5e338c7f1d5759471
BLAKE2b-256 483cbdb8c114768cfc9355615789e2a950cd9b09031c500b2503af035199297e

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