Skip to content

Commit

Permalink
update internal data
Browse files Browse the repository at this point in the history
  • Loading branch information
yosuke-yasuda committed Jan 4, 2017
1 parent 570c467 commit 138075f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Binary file modified R/sysdata.rda
Binary file not shown.
15 changes: 8 additions & 7 deletions data-raw/create_internal_data.R
@@ -1,4 +1,5 @@
#### Generate sentiment data
library(exploratory)

data("sentiments", package = "tidytext", envir = environment())
data("stop_words", package = "tidytext", envir = environment())
Expand All @@ -25,11 +26,11 @@ stopwords_japanese <- httr::content(res) %>% stringr::str_split("\r\n")
# ja_stopwrods is a list whose length is 1
stopwords_japanese <- stopwords_japanese[[1]][!is_empty(stopwords_japanese[[1]])]

stopwords_smart <- readRDS("data-raw/stopwords_smart.rds")
stopwords_onix <- readRDS("data-raw/stopwords_onix.rds")
stopwords_snowball <- readRDS("data-raw/stopwords_snowball.rds")
stopwords_english_smart <- readRDS("data-raw/stopwords_smart.rds")
stopwords_english_onix <- readRDS("data-raw/stopwords_onix.rds")
stopwords_english_snowball <- readRDS("data-raw/stopwords_snowball.rds")

if(all(!ja_stopwords %in% c("あなた", "いくつ", "いろいろ", "おまえ"))){
if(all(!stopwords_japanese %in% c("あなた", "いくつ", "いろいろ", "おまえ"))){
stop("stopwords_japanese seems strange")
}

Expand All @@ -40,8 +41,8 @@ devtools::use_data(
default_stopwords,
exploratory_stopwords,
stopwords_japanese,
stopwords_smart,
stopwords_onix,
stopwords_snowball,
stopwords_english_smart,
stopwords_english_onix,
stopwords_english_snowball,
internal = TRUE,
overwrite = TRUE)

0 comments on commit 138075f

Please sign in to comment.