case repair example

node v18.11.0
version: master
endpointsharetweet
var nlp=require('compromise') let doc = nlp('SO I WAS WALKING IN CHICAGO AND I SAW PARIS HILTON.') //lowercase everything doc.toLowerCase() // misc titlecase decisions doc.match('(#ProperNoun|#Month|i|god)').toTitleCase() //titlecase first word of each sentence doc.sentences().forEach(s=>s.terms(0).toTitleCase()) doc.text()
Loading…

no comments

    sign in to comment