0.0.3 • Published 4 years ago

textml v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

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']