Skip to content

Commit

Permalink
[readability] add table of all available algos
Browse files Browse the repository at this point in the history
  • Loading branch information
MrLightful committed Feb 16, 2025
1 parent 6f15d3f commit e646308
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions packages/readability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ npm install @lunarisapp/readability
import { TextReadability } from '@lunarisapp/readability';

const textReadability = new TextReadability({
lang: 'en_US',
lang: 'en_US', // optional, en_US by default
cache: true, // optional, true by default
});

textReadability.fleschReadingEase('Hello, world!');
Expand All @@ -41,4 +42,23 @@ fleschReadingEase({
```

## Algorithms
// TODO

| Function | Description |
|-------------------------------------|-----------------------------------------------------------------------------|
| `fleschReadingEase(text)` | Calculates the [Flesch Reading Ease](https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests#Flesch_reading_ease) score for the provided text. |
| `fleschKincaidGrade(text)` | Calculates the [Flesch-Kincaid Grade Level](https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests#Flesch%E2%80%93Kincaid_grade_level) for the provided text. |
| `smogIndex(text)` | Calculates the [SMOG Index](https://en.wikipedia.org/wiki/SMOG) for the provided text. |
| `automatedReadabilityIndex(text)` | Calculates the [Automated Readability Index (ARI)](https://en.wikipedia.org/wiki/Automated_readability_index) for the provided text. |
| `colemanLiauIndex(text)` | Calculates the [Coleman-Liau Index](https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index) for the provided text. |
| `linsearWriteFormula(text)` | Calculates the [Linsear Write Formula](https://en.wikipedia.org/wiki/Linsear_Write) readability score for the provided text.|
| `crawford(text)` | Calculates the [Crawford Readability Score](https://www.spanishreadability.com/the-crawford-score-for-spanish-texts) for the provided text. |
| `gulpeaseIndex(text)` | Calculates the [Gulpease Index](https://it.wikipedia.org/wiki/Indice_Gulpease) for the provided text. |
| `gutierrezPolini(text)` | Calculates the [Gutierrez-Polini Index](https://www.spanishreadability.com/gutierrez-de-polinis-readability-formula) for the provided text. |
| `wienerSachtextformel(text)` | Calculates the [Wiener Sachtextformel](https://de.wikipedia.org/wiki/Lesbarkeitsindex#Wiener_Sachtextformel) readability score for the provided text.|
| `mcalpineEflaw(text)` | Calculates the [McAlpine English Fluency Assessment (EFLAW) score](https://www.angelfire.com/nd/nirmaldasan/journalismonline/fpetge.html) for the provided text. |

## Other

```typescript
import { type Language } from '@lunarisapp/readability';
```

0 comments on commit e646308

Please # to comment.