Published
Edited
Jul 7, 2021
1 fork
4 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
markedUpText = {
var doc = nlp.readDoc(text);
// Using doc
doc
// extract entities,
.entities()
// filter DATE & TIME,
.filter( e => ( isDateTime[e.out(its.type)] ) )
// and finally markup with bold tag with class as entity type.
.each( e => e.markup(`<span class='${e.out(its.type)} entity'>`, `</span>`) );
// Return the marked up text as html.
return html`<p>${doc.out(its.markedUpText)}</p>`;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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