nlp("that's it. Back to Winnipeg!").sentences().length
nlp("If it rains then back to Winnipeg!").sentences().clauses().json()
nlp("If word gets out about this, Kwazy-Clown Airlines will be a laughing stock.").sentences().subjects().text()
nlp('we get it, you vape.').sentences().toPastTense().text()
nlp(`hey pal, did you get a load of the nerd?`).sentences().toPresentTense().text()
nlp('we like roy!').sentences().toFutureTense().text()
nlp(`I was saying boo-urns.`).sentences().toNegative().text()
nlp("okay, don't use reverse psychology.").sentences().toPositive().text()
nlp('i was stung by a bee. I stung it back.').sentences().isPassive().out('array')
nlp('are you saying boo, or boo-urns? I was saying boo-urns.').sentences().isQuestion().out('array')
nlp('we like Roy! we like Roy!').sentences().isExclamation().out('array')
nlp('are you saying boo, or boo-urns? I was saying boo-urns.').sentences().isStatement().out('array')
nlp("I’m lookin’ for Amanda Hugginkiss.").sentences().prepend('Hey everybody,').text()
nlp("hey guys, do I have a Bee Oproblem?").sentences().append('here').text()
nlp(`I can't believe it's a law firm.`).sentences().toExclamation().text()
nlp(`I can't believe it's a law firm.`).sentences().toQuestion().text()
nlp(`I can't believe it's a law firm!`).sentences().toStatement().text()
nlp={
letnlp=awaitrequire('compromise@latest')
letplugin=awaitrequire('compromise-sentences')
nlp.extend(plugin)
returnnlp
}
nlp.version
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.