Published
Edited
Oct 25, 2021
3 forks
11 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const wikiBaseUrl = 'https://en.wikipedia.org/wiki?';
const doc = nlp.readDoc( text );
const potentialEntities = doc.customEntities().out();
const results = (await searchAllTerms( potentialEntities )); // return results;
doc.customEntities().each( (e, i) => {
const match = findBestMatch( results[ i ], e );
if ( match !== null )
e.markup(`<a href="${wikiBaseUrl}title=${match.title}" title="${match.title}" class="demo"><b>`, '</b></a>');
} );
return html `<div class="container">${doc.out(its.markedUpText)}</div>`;
}
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
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