sweet-cream
v0.0.3
Published
Text normalization library meant to be used to normalize speech transcriptions.
Downloads
8
Readme
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