Published
Edited
Jun 23, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
doc = nlp.readDoc( text );
Insert cell
Insert cell
{
// Markup each NOUN that has been labelled with 80% confidence.
doc.tokens().each((t) => t.out(its.pos) === 'NOUN' && t.out(its.posConfidence) >= 0.80 && t.markup());
// Return as HTML.
return html`${doc.out(its.markedUpText)}`;
}
Insert cell
Insert cell
{
// Markup each entity that has been labelled with a 95% confidence.
doc.entities().each((e) => e.out(its.typeConfidence) >= 0.95 && e.markup());
// Return as HTML.
return html`${doc.out(its.markedUpText)}`;
}
Insert cell
Insert cell
Insert cell
Insert cell
winkNLP = (await import('https://cdn.skypack.dev/wink-nlp')).default;
Insert cell
Insert cell
model = (await import('https://cdn.skypack.dev/wink-eng-lite-web-model')).default;
Insert cell
Insert cell
nlp = winkNLP( model );
Insert cell
Insert cell
its = nlp.its;
Insert cell
as = nlp.as;
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