Metadata-Version: 2.4
Name: semantic-bit
Version: 0.1.0
Summary: Generate structured JSON metadata for up to 5000 characters of text.
Author: Dan Ray, Gregory Blacketter
License: MIT
Project-URL: Homepage, https://github.com/antfriend/semantic_bit_theory/blob/main/README.md
Project-URL: Repository, https://github.com/antfriend/semantic_bit_theory
Keywords: text,analysis,json
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"

﻿# semantic-bit

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

## Installation

```bash
pip install semantic-bit
```

## Python usage

```python
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

```bash
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

```bash
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`):
   ```bash
   python -m build
   ```
3. Upload to PyPI (replace `pypi` with `testpypi` for a dry run):
   ```bash
   python -m twine upload dist/*
   ```

To install the package from TestPyPI for validation:

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

## License

MIT
