Published
Edited
Mar 23, 2022
4 stars
Insert cell
Insert cell
{
let doc=nlp('Read my lips. no new taxes.')
return doc.eq(1).out('text')
}
Insert cell
Insert cell
{
let text='Hi I’m Troy Maclure. You may remember me from from such instructional videos as “Mothballing Your Battleship” and “Dig Your Own Grave and Save”.'
//parse the text..
let doc=nlp(text)
//output all sentences, terms, and their metadata
return doc.json()
}
Insert cell
Insert cell
{
let doc=nlp(`OK, Mr. Burns, what's your first name?`)
//grab a part of it ('Mr. Burns')
let m1= doc.people()
//do a match on our match
let m2 = m1.match('(simpson|burns)')
//change it..
m2.toUpperCase()
//print the original document
return doc.text()
}
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