Published
Edited
May 31, 2020
1 fork
Insert cell
md`# NLP on Participedia case`
Insert cell
data = FileAttachment("participedia-case-5729.json").json();
Insert cell
data.article.body
Insert cell
// PEOPLE
nlp(data.article.body).people().out("array");
Insert cell
// organizations
nlp(data.article.body).organizations().out("array");
Insert cell
// DATES
nlp(data.article.body).dates().out('array')
Insert cell
// VERBS
nlp(data.article.body).verbs().out('array')
Insert cell
// NOUNS
nlp(data.article.body).nouns().out('array')
Insert cell
nlp = {
let nlp = await require('compromise@latest')
let plugin = await require('compromise-dates')
nlp.extend(plugin)
return nlp
}
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