Skip to content

textlens v1.0.0

Choose a tag to compare

@ckmtools ckmtools released this 04 Mar 06:31
· 19 commits to main since this release

textlens v1.0.0

Zero-dependency TypeScript text analysis and readability toolkit.

Features

  • 8 Readability Formulas: Flesch Reading Ease, Flesch-Kincaid, Coleman-Liau, ARI, Gunning Fog, SMOG, Dale-Chall, Linsear Write
  • Sentiment Analysis: AFINN-165 lexicon-based scoring
  • Keyword Extraction: TF-based with stopword filtering
  • Keyword Density: Unigram, bigram, and trigram analysis
  • SEO Scoring: Composite score with actionable suggestions
  • Reading Time: Configurable WPM with image support
  • Extractive Summarization: Position + keyword frequency weighted
  • CLI Tool: Pretty output, JSON mode, stdin support

Install

npm install textlens

Quick Start

import { analyze } from 'textlens';
const result = analyze('Your text here...');
console.log(result.readability.consensusGrade);

Links