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.9.0.dev22.tar.gz.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.9.0.dev22.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","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.9.0.dev22.tar.gz
Algorithm Hash digest
SHA256 f1396549b4d6e490ad6ae4342a202508a6f6777bfc92be4f8fb07e634342d40c
MD5 11b56efafe5f7abde6c36959b43271b1
BLAKE2b-256 6519f0fbdcb0cc753dc2ceed242110c4de515d38090e3052296b9b293036daf9

See more details on using hashes here.

File details

Details for the file swarmauri_tool_dalechallreadability-0.9.0.dev22-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_tool_dalechallreadability-0.9.0.dev22-py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","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.9.0.dev22-py3-none-any.whl
Algorithm Hash digest
SHA256 6a1292f8036e840bed0006ebfdfd43b035f5c9d1af40fb10efd534ee23367e1b
MD5 6e98a651cd43b89667dcdbc74dfedcf7
BLAKE2b-256 9d353cf25715ac0f21aa4c1f2a994626bd5a4d182112be50df9ad901bd263faa

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