#' Pack Output of mecab
#'
#' @param df output of \code{mecabr::mecab}
#' @return data.frame
#'
#' @import dplyr
#' @importFrom purrr map_dfr
#' @importFrom tibble rowid_to_column
#' @export
pack_df <- function(df) {
res <- df %>%
dplyr::group_by(doc_id) %>%
dplyr::group_map(~ paste(.x$surface, collapse = " ")) %>%
purrr::map_dfr(~ tibble::tibble(text = .)) %>%
tibble::rowid_to_column("doc_id")
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.