letdoc=nlp(`Springfield, springfield! it's a hell of a town.`)
letterms=doc.terms()//split by term
//remove duplicate matches
terms=terms.unique()
returnterms.out('array')
}
{
letdoc=nlp("that's it. Back to Winnipeg!")
// reverse the order of the sentences
doc=doc.reverse()
//clean-up the whitespace
doc.normalize({whitespace:true})
returndoc.map(d=>d.text('normal'))
}
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.