Swarmauri Tool Dale-Chall Readability
Tool wrapper around textstat to compute the Dale–Chall readability score for a block of text via the Swarmauri tool interface.
Features
- Accepts an
input_textparameter and returns{"dale_chall_score": <float>}. - Uses
textstat.dale_chall_readability_scoreunder the hood. - Input validation ensures the required parameter is present before calculation.
Prerequisites
- Python 3.10 or newer.
textstatandpyphendictionaries (installed automatically). Some textstat metrics may download additional word lists on first use.
Installation
# pip
pip install swarmauri_tool_dalechallreadability
# poetry
poetry add swarmauri_tool_dalechallreadability
# uv (pyproject-based projects)
uv add swarmauri_tool_dalechallreadability
Quickstart
from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool
text = "This is a simple sentence for testing purposes."
tool = DaleChallReadabilityTool()
result = tool({"input_text": text})
print(result)
Usage in Tool Chains
from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool
def grade_paragraph(paragraph: str) -> float:
tool = DaleChallReadabilityTool()
score = tool({"input_text": paragraph})["dale_chall_score"]
return score
Tips
- Dale–Chall scores roughly map to U.S. grade levels; lower scores indicate easier reading.
- Pre-clean text (remove markup, normalize whitespace) for consistent scoring.
- Combine with Swarmauri measurements or parsers to evaluate readability across multiple documents.
Want to help?
If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.
Metadata
Release files for swarmauri_tool_dalechallreadability 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| swarmauri_tool_dalechallreadability-0.10.0.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| swarmauri_tool_dalechallreadability-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.7 kB
Release files / swarmauri_tool_dalechallreadability-0.10.0.tar.gz
| Download URL | swarmauri_tool_dalechallreadability-0.10.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5b42381fe72e87f1c05262214f1aa9d01fbcaa85d9894a3d2ae0a6e6d76c74e
|
|
BLAKE2b-256 checksum How to use checksums |
25ef49556480e8d9b97df998177d6ef38590cc44ef212864e31f73c85b8924cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / swarmauri_tool_dalechallreadability-0.10.0-py3-none-any.whl
| Download URL | swarmauri_tool_dalechallreadability-0.10.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e3cb2846b9c1faf8bc4cfe7a4d957904ac5a7c47077c2c2b6fc40cdf098d33bc
|
|
BLAKE2b-256 checksum How to use checksums |
a8c425efd45a3e0fa8b2656a9f001fb91ffe3a1fcd3f95b420f718366c4ed383
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.0 {"installer":{"name":"uv","version":"0.11.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|