Public
Edited
Mar 25, 2022
2 forks
3 stars
Insert cell
Insert cell
{
let doc = nlp('Hi everybody! Hi Dr. Nick!')
return doc.document
}
Insert cell
Insert cell
nlp(`"i don't care. Nothing's gonna stop me in the middle of this speech. You're gonna - lemon tree?!"`).length
Insert cell
Insert cell
nlp.model().one.abbreviations
Insert cell
Insert cell
{
let doc = nlp('juvinile diabetes? Hysterical pregnency?')
return doc.has('diabetes hysterical') //nope
}
Insert cell
Insert cell
nlp("that's it. Back to Winnipeg!").sentences().length
Insert cell
Insert cell
nlp("that's it. Back to Winnipeg!").sentences().json()
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('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 = await require('compromise')
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