inst/doc/bigram.R

## ----include = FALSE----------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(moranajp)

## ----eval = FALSE, fig.width=6, fig.height=6----------------------------------
#  data(synonym)
#  synonym <- unescape_utf(synonym)
#  
#  data(neko_mecab)
#  neko_mecab <-
#    neko_mecab  |>
#    unescape_utf() |>
#    add_sentence_no() |>
#    clean_up(use_common_data = TRUE, synonym_df = synonym)
#  
#  bigram_neko <-
#    neko_mecab |>
#    draw_bigram_network()
#  
#  add_stop_words <-
#    c("\\u3042\\u308b", "\\u3059\\u308b", "\\u3066\\u308b",
#      "\\u3044\\u308b","\\u306e", "\\u306a\\u308b", "\\u304a\\u308b",
#      "\\u3093", "\\u308c\\u308b", "*") |>
#     unescape_utf()
#  
#  data(review_chamame)
#  bigram_review <-
#    review_chamame |>
#    dplyr::slice(1:2000) |>
#    unescape_utf() |>
#    add_sentence_no() |>
#    clean_up(add_stop_words = add_stop_words) |>
#    draw_bigram_network()

Try the moranajp package in your browser

Any scripts or data that you put into this service are public.

moranajp documentation built on Sept. 11, 2024, 8:09 p.m.