## annotate abstracts
annotate_abstracts <- function(abstract, pmid){
require(udpipe)
ud_model <- udpipe_download_model("english")
ud_model <- udpipe_load_model(ud_model$file_model)
x <- udpipe_annotate(ud_model, x = abstract, doc_id = pmid)
x <- as.data.frame(x)
x$topic_id <- unique_identifier(x, fields = c("doc_id", "paragraph_id", "sentence_id"))
return(x)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.