0.1.10 • Published 10 months ago

@kitsuyui/word-stats v0.1.10

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@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

0.1.10

10 months ago

0.1.9

10 months ago

0.0.0

10 months ago