Published
Edited
Mar 15, 2021
2 stars
Insert cell
Insert cell
Insert cell
nlp("that's it. Back to Winnipeg!").sentences().length
Insert cell
Insert cell
nlp("If it rains then back to Winnipeg!").sentences().clauses().json()
Insert cell
Insert cell
nlp("If word gets out about this, Kwazy-Clown Airlines will be a laughing stock.").sentences().subjects().text()
Insert cell
Insert cell
nlp('we get it, you vape.').sentences().toPastTense().text()
Insert cell
Insert cell
nlp(`hey pal, did you get a load of the nerd?`).sentences().toPresentTense().text()
Insert cell
Insert cell
nlp('we like roy!').sentences().toFutureTense().text()
Insert cell
Insert cell
nlp(`I was saying boo-urns.`).sentences().toNegative().text()
Insert cell
Insert cell
nlp("okay, don't use reverse psychology.").sentences().toPositive().text()
Insert cell
Insert cell
nlp('i was stung by a bee. I stung it back.').sentences().isPassive().out('array')
Insert cell
Insert cell
nlp('are you saying boo, or boo-urns? I was saying boo-urns.').sentences().isQuestion().out('array')
Insert cell
Insert cell
nlp('we like Roy! we like Roy!').sentences().isExclamation().out('array')
Insert cell
Insert cell
nlp('are you saying boo, or boo-urns? I was saying boo-urns.').sentences().isStatement().out('array')
Insert cell
Insert cell
nlp("I’m lookin’ for Amanda Hugginkiss.").sentences().prepend('Hey everybody,').text()
Insert cell
Insert cell
nlp("hey guys, do I have a Bee Oproblem?").sentences().append('here').text()
Insert cell
Insert cell
nlp(`I can't believe it's a law firm.`).sentences().toExclamation().text()
Insert cell
Insert cell
nlp(`I can't believe it's a law firm.`).sentences().toQuestion().text()
Insert cell
Insert cell
nlp(`I can't believe it's a law firm!`).sentences().toStatement().text()
Insert cell
Insert cell
nlp = {
let nlp = await require('compromise@latest')
let plugin = await require('compromise-sentences')
nlp.extend(plugin)
return nlp
}
Insert cell
nlp.version
Insert cell

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.
Learn more