textml

0.0.3 • Public • Published

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

/textml/

    Package Sidebar

    Install

    npm i textml

    Weekly Downloads

    6

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    3.78 kB

    Total Files

    5

    Last publish

    Collaborators

    • mfeyx