assertchris/ellison

Simple library that helps identify complex sentences and poor word choices

Maintainers

👁 assertchris

Package info

github.com/assertchris/ellison-php

pkg:composer/assertchris/ellison

Statistics

Installs: 1 733

Dependents: 2

Suggesters: 2

Stars: 6

Open Issues: 0

1.0.2 2024-05-10 14:14 UTC

Requires

None

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 26dbc8b319d1bc4f5a08885b6e721cd482f42fca

  • Christopher Pitt <me.woop@assertchris.io>

This package is auto-updated.

Last update: 2026-06-22 08:23:05 UTC


README

Ellison is a simple library that helps identify complex sentences and poor word choices. It uses similar heuristics to Hemingway, but it doesn't include any calls to third-party APIs or LLMs. Just a bit of PHP.

You can install it with:

composer require assertchris/ellison

...And, use it with:

$ellison = new AC\Ellison\Ellison();

$ellison->getSentenceDifficulty('This is a paragraph of text. It may include some moderately complex sentences, with slightly complex words. It might also include verbose sentences that tax the brain, tire the eyes, and exhaust the brain; all in an attempt to make the writer sound amazing.');

// => [
// [text => 'This is...of text', type => 'simple']
// [text => 'It may...complex words', type => 'moderate']
// [text => 'It might...sound amazing', type => 'complex']
// ]

$ellison->getPassivePhrases('This sentence may have been written by a corgi');

// => [
// [text => 'been written', type => 'passive'] 
// ]

Feel free to submit PRs for more phrases and words that interest you. I have no interest in supporting non-english languages at this time.