Skip to main content

Swarmauri readability-analysis tool for computing Dale-Chall scores across prompts, documents, and educational content.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_tool_dalechallreadability Discord

Swarmauri Tool Dale-Chall Readability

swarmauri_tool_dalechallreadability is a Swarmauri readability-analysis tool that wraps textstat to calculate the Dale-Chall readability score for a block of text. It is useful for education content, public-sector language review, documentation QA, prompt inspection, and workflows that need a familiar readability benchmark.

Why Use Swarmauri Tool Dale-Chall Readability

  • Estimate whether writing is easy enough for the intended audience.
  • Add readability gates to content and documentation pipelines.
  • Reuse a standard readability metric inside Swarmauri agents and tools.
  • Compare revisions or content sets with a consistent score.

FAQ

What does the tool return?
A dictionary with one key: dale_chall_score.

What input shape does it expect?
The current implementation expects a dictionary containing input_text.

What library does it use?
It uses textstat.dale_chall_readability_score.

What does a lower score mean?
Lower Dale-Chall scores generally indicate easier reading.

Features

  • Swarmauri ToolBase implementation registered as DaleChallReadabilityTool.
  • Returns a standard Dale-Chall readability score.
  • Works well for educational, policy, and editorial review workflows.
  • Thin wrapper over textstat, keeping usage simple and predictable.
  • Supports Python 3.10, 3.11, 3.12, 3.13, and 3.14.

Installation

uv add swarmauri_tool_dalechallreadability
pip install swarmauri_tool_dalechallreadability

Usage

from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool

tool = DaleChallReadabilityTool()
result = tool({"input_text": "This is a simple sentence for testing purposes."})

print(result["dale_chall_score"])

Examples

Score a policy paragraph

from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool

tool = DaleChallReadabilityTool()
score = tool(
    {
        "input_text": "Applicants must complete the registration form and provide identity verification before approval."
    }
)

print(score)

Compare plain-language and technical versions

from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool

tool = DaleChallReadabilityTool()

plain = {"input_text": "Read the guide and follow the steps."}
technical = {"input_text": "Administrative verification shall precede credential issuance and service activation."}

print("plain", tool(plain))
print("technical", tool(technical))

Register the tool in a Swarmauri collection

from swarmauri_standard.tools.ToolCollection import ToolCollection
from swarmauri_tool_dalechallreadability import DaleChallReadabilityTool

tools = ToolCollection(tools=[DaleChallReadabilityTool()])
print(tools)

Related Packages

Swarmauri Foundations

More Documentation

Best Practices

  • Clean markup and normalize whitespace before scoring text.
  • Use the score comparatively across similar content types.
  • Pair Dale-Chall with structural metrics for better editorial judgment.
  • Wrap the input text into the expected {"input_text": ...} shape.

License

This project is licensed under the Apache-2.0 License.

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

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

File details

Details for the file swarmauri_tool_dalechallreadability-0.11.0.dev1.tar.gz.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.11.0.dev1.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_tool_dalechallreadability-0.11.0.dev1.tar.gz
Algorithm Hash digest
SHA256 b012b3d582980bdbe2ffc23b93cd2254c6d2948bc4a221d6046077bc6ba59eef
MD5 9d80be62455fc7cc9daff778f1efb934
BLAKE2b-256 d89d68d4fca8d6e9f416761f7f9856626810cfb7092b75cd325ce4a7040757c6

See more details on using hashes here.

File details

Details for the file swarmauri_tool_dalechallreadability-0.11.0.dev1-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.11.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_tool_dalechallreadability-0.11.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 e13915fba98c983df18360ed6ec2a74f721eb028e2010d26aff02ec2bf056112
MD5 13ec80468a961efac5f36a67357b096d
BLAKE2b-256 d1c5a79931c6b8c3a90ec06b95a30a5b149d0b7449b15e51daa04b17155ac99b

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