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

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