Skip to main content

Swarmauri Community Dale-Chall Readability Tool

Project description

Swarmauri Logo

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


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_text parameter and returns {"dale_chall_score": <float>}.
  • Uses textstat.dale_chall_readability_score under the hood.
  • Input validation ensures the required parameter is present before calculation.

Prerequisites

  • Python 3.10 or newer.
  • textstat and pyphen dictionaries (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.

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.10.0.dev2.tar.gz.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.10.0.dev2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.10.0.dev2.tar.gz
Algorithm Hash digest
SHA256 76a6de40625fd7693d5ab3b652ce1e7bf95d3d5ae9c63f1774acb130687825e4
MD5 ad1fdd63b72336620111ed72cfc2eccb
BLAKE2b-256 0a3fcbe9fd41dd040010340adf3d5b36148c5216728e7f67cf4484c5d8364e47

See more details on using hashes here.

File details

Details for the file swarmauri_tool_dalechallreadability-0.10.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.10.0.dev2-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","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.10.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 ace82700f913548dd9413f41fed11232acc1025e5dd8422d2e5538cff6f0a6be
MD5 21fd603b76483911e6dc6ae58ff499e1
BLAKE2b-256 944ca26ec5176d74eebc1b6c187406391c21d443a0e09e863fcf566d717286d6

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