Description Usage Arguments Details Value Examples
Visualize entities in text parsed with spacyr.
1 | display_ent(x, deco_ent = "bgYellow", deco_lab = "bgBlue")
|
x |
A spacyr_parsed object |
deco_ent |
A crayon style for entity name, given as a character string |
deco_lab |
A crayon style for entity label, given as a character string |
x must include the "whitespace_" attribute. Therefore, spacy_parse
should be run with the additional_attributes argument:
spacy_parse(x, ..., additional_attributes = "whitespace_"). This
function is designed to be called for its side effect, which outputs
a styled character vector to the terminal.
A character string with styled tokens
1 2 3 4 5 6 | ## Not run:
txt <- "Larry Page is the co-founder of Google, located in Mountain View, CA."
parsed <- spacyr::spacy_parse(txt, additional_attributes = "whitespace_")
display_ent(parsed)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.