Platform
Resources
Pricing
Sign in
Contact us
WinkJS
Developer friendly Natural Language Processing ✨
Workspace
Fork
Published
WinkNLP Recipes
By
WinkJS
Edited
Jun 30, 2021
MIT
2 forks
11 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
doc
=
nlp
.
readDoc
(
text
)
;
Insert cell
Insert cell
{
// Markup each entity.
doc
.
entities
(
)
.
each
(
(
e
)
=>
e
.
markup
(
'<b>'
,
`</b><sub>[${
e
.
out
(
its
.
detail
)
.
type
}]</sub>`
)
)
;
// Return as HTML.
return
html
`<p class='entity'>${
doc
.
out
(
its
.
markedUpText
)
}</p>`
;
}
Insert cell
Insert cell
{
let
table
=
'<table><tr><th>Word</th><th>Frequency</th></tr>'
;
doc
.
tokens
(
)
.
out
(
its
.
type
,
as
.
freqTable
)
.
forEach
(
(
e
)
=>
{
table
+=
`<tr><td>${
e
[
0
]
}</td><td>${
e
[
1
]
}</td></tr>`
;
}
)
return
html
`${
table
}</table>`
;
}
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
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.
Try it for free
Learn more
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
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
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML