doc.people().tag('Actor')// no longer doctor, or Surgeon
returndoc.out('tags')
}
{
//add a new tag:
nlp.extend({
tags:{CoolTag:{}}
})
returnnlp.model().one.tagSet
}
{
letdoc=nlp(`I've got a Dungeon Master's Guide`)
doc.compute('penn')
letjson=doc.json()[0].terms
returnjson.map(term=>[term.text,term.penn])
}
{
constmapping={
CC:'Conjunction',
CD:'Cardinal',
DT:'Determiner',
EX:'Preposition',//Existential there
FW:'Expression',
IN:'Preposition',
JJ:'Adjective',
JJR:'Comparative',
JJS:'Superlative',
MD:'Modal',
NN:'Noun',
NNS:'Plural',
NNP:'Singular',
NNPS:' Plural',
POS:'Possessive',
PRP:'Pronoun',
RB:'Adverb',
RBR:'Comparative',
RBS:'Superlative',
RP:'PhrasalVerb',
PDT:'Determiner',
SYM:'Expression',
TO:'Conjunction',
UH:'Expression',
VB:'Verb',
VBD:'PastTense',
VBG:'Gerund',
VBN:'Participle',// past participle
VBP:'PresentTense',// non-3rd person singular present
VBZ:'PresentTense',// 3rd person singular present
'PRP$':'Pronoun',
'WP$':'Possessive',
WDT:'Determiner',
WP:'Pronoun',
WRB:'Adverb',
}
}
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.