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

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