Platform
Resources
Pricing
Sign in
Get started
Adamo Carolli
https://twitter.com/adamocarolli
Workspace
Fork
Published
By
Adamo Carolli
Edited
Jun 23, 2021
MIT
Fork of
How to run wink-nlp on Observable?
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.
Try it for free
Learn more
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
text
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
doc
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
winkNLP
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
model
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
nlp
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
its
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
as
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML