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
- Ensure the version in
pyproject.tomlis bumped appropriately. - Build the package (install build backend first:
pip install build twine):python -m build
- Upload to PyPI (replace
pypiwithtestpypifor 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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41981ed5c139039e7638689a7d1cd1a9ea5f456216701f8ac30fc09b92fb1231
|
|
| MD5 |
2409d9c5d8d8160d3a3a4ea44b6f757b
|
|
| BLAKE2b-256 |
f517332796095810aeeb9ddd1697102442d1764a91ca6b6db4a16024a7e8cec2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3d39244426d38084b83a338a0b36e16b1b2e2d6818df644c1de04d46af9362d
|
|
| MD5 |
fd50f42c65b4acc5e338c7f1d5759471
|
|
| BLAKE2b-256 |
483cbdb8c114768cfc9355615789e2a950cd9b09031c500b2503af035199297e
|