Public
Edited
Feb 16, 2024
2 stars
Insert cell
Insert cell
{
let doc = nlp('Toronto Blue Jays')
return JSON.stringify(doc.json(), null, 2)
}
Insert cell
Insert cell
nlp(`wee-ooh and you're Mary Tyler Moore`).match('#FirstName').json()[0]
Insert cell
Insert cell
{
let doc = nlp('one hundred and three')
let json = JSON.stringify(doc.json())
// -send this over the internet-
json = JSON.parse(json)
let docB = nlp(json) // put it right in
// good-as-ever
return docB.numbers().toNumber().text()
}
Insert cell
Insert cell
{
let doc = nlp(`a walk-in microwave...`)
let opts = { normal: true, terms:false }
return doc.json(opts)[0]
}
Insert cell
Insert cell
Insert cell
{
let doc = nlp('Who holds back the electric car? Who made Steve Guttenberg a star?')
let nouns = doc.match('#Person+')
return nouns.json({offset:true})
}
Insert cell
Insert cell
Insert cell
{
let doc = nlp('and you, you will be queen')
doc.compute('freq')
return doc.json()[0].terms.sort((a,b)=> a.freq < b.freq)
}
Insert cell
Insert cell
{
let doc = nlp("Mya Normisbutt")
doc.compute('tagRank')
return doc.json()[0].terms[0].tagRank
}
Insert cell
Insert cell
nlp('Probably misses his old glasses').nouns().json()[0]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more