sweet-cream
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

sweet-cream

This package serves as a general-purpose text normalizer. It allows users to configure a normalizer that they can then use to normalize text in several ways (lexical vs numerical numbers, casing, apostrophes, etc).

Installation

npm install sweet-cream

Usage

TypeScript

import { Normalizer } from "sweet-cream";
 
let normalizer = new Normalizer({
  numbering: "lexical",
  casing: "lower",
  expandApostropheWords: true,
  removePunctuation: true
})
 
console.log(normalizer.normalize("I'll have 1 hen and 2 ducks!")); // => i will have one hen and two ducks

Readme

Keywords

none

Package Sidebar

Install

npm i sweet-cream

Weekly Downloads

2

Version

0.0.3

License

ISC

Unpacked Size

15.8 kB

Total Files

16

Last publish

Collaborators

  • ryvolum