UNPKG

ai-text-detector

Version:

A lightweight, fast JavaScript/TypeScript library for detecting AI-generated text using advanced linguistic analysis. Works in Node.js, React, and browser environments with zero dependencies.

6 lines (5 loc) 208 B
/** * Perplexity calculation for AI text detection * Measures how well a text can be predicted based on statistical language models */ export declare function calculatePerplexity(words: string[]): number;