@kitsuyui/word-stats
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

@kitsuyui/word-stats

A simple word-stats manipulation library

Installation

NPM

npm install @kitsuyui/word-stats

Yarn

yarn add @kitsuyui/word-stats

PNPM

pnpm add @kitsuyui/word-stats

Usage

wordCount

import { wordCount } from '@kitsuyui/word-stats';
const documents = [
  ['a', 'b', 'c'],
  ['a', 'b', 'd'],
]
const result = wordCount(documents)
result // => { a: 2, b: 2, c: 1, d: 1 }
  • wordCount: Count the number of words in the documents
  • computeTermFrequencies: Compute the term frequencies of the documents
  • computeInverseDocumentFrequency: Compute the inverse document frequencies of the documents
  • extractUniqueWords: Extract unique words from the documents

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @kitsuyui/word-stats

Weekly Downloads

1

Version

0.1.10

License

MIT

Unpacked Size

16.1 kB

Total Files

8

Last publish

Collaborators

  • kitsuyui