Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 892 Bytes

README.md

File metadata and controls

51 lines (38 loc) · 892 Bytes

chatbot-normalizer

This package attempts to process a string and make it easier to consume by bots.


  1. spelling corrections for common spelling errors
  2. idiom conversions
  3. junk word removal from sentence
  4. special sentence effects (question, exclamation, revert question)
  5. abbreviation expansion and canonization
  6. British & Canadian english to American english

example conversions:

Nov 1st I weighed 90 kgs. total
November 1st I weighed 90 kilograms total
I’ll listen to y’all
I will listen to you all
armour axe coloured gold
armor ax colored gold
are we sceduled thrsday for teh restraunt
are we scheduled Thursday for the restaurant

Installation:

$ npm install --save chatbot-normalizer

Use:

import normalize from 'chatbot-normalizer'

normalize('Your string here')
.then(output => {
  console.log(output)
  })