trumposwere

1.0.0 • Public • Published

Trumposwere

A collection of text analytics functions for Node.js applications.

Installation

You can install this module via npm: npm install trumposwere

Usage

const textAnalytics = require('text-analytics-kit');

// Tokenize text
const text = "The quick brown fox jumps over the lazy dog";
console.log('Tokenized:', textAnalytics.tokenize(text));

// Calculate term frequency
const document = "The quick brown fox jumps over the lazy dog";
console.log('Term Frequency:', textAnalytics.calculateTermFrequency(document));

// Calculate inverse document frequency
const documents = [
  "The quick brown fox jumps over the lazy dog",
  "The lazy dog slept in the sun"
];
console.log('Inverse Document Frequency:', textAnalytics.calculateInverseDocumentFrequency(documents));

Readme

Keywords

none

Package Sidebar

Install

npm i trumposwere

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.3 kB

Total Files

3

Last publish

Collaborators

  • trumposwere1973