🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

textml

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textml

Machine Learning for Textual Data with JavaScript

0.0.3
latest
Source
npm
Version published
Maintainers
1
Created
Source

textml – Text Analysis with JavaScript

Require the module

// load module
const textml = require('textml')

API

tokenize()

Tokenize a text input (a type string input)

const text = 'Hello, world! How are you today?'

/* defaults */
const options = {
  delimiter: ' ',
  pattern: '[.,:?!/]',
  preprocess: true,
  removePunctuation: true,
  removeDigits: true,
  lowercase: true
}

const tokens = textml.tokenize(text, options)
// ['hello', 'world', 'how', 'are', 'you', 'today']

Keywords

text analysis

FAQs

Package last updated on 17 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts