塾生による自由記述\((n=17)\)
res.wdfq.1 <- RMeCabFreq("WhyEduPsy.txt")
## file = WhyEduPsy.txt
## length = 579
DT::datatable(res.wdfq.1)
res.wdfq.2 <- docDF("WhyEduPsy.txt", type=1, pos = c("名詞", "動詞", "形容詞"))
## file_name = ./WhyEduPsy.txt opened
## number of extracted terms = 458
## now making a data frame. wait a while!
DT::datatable(res.wdfq.2)
res.wdfq.30 <- docDF("WhyEduPsy.txt", type=1, pos = c("名詞", "動詞", "形容詞"))
## file_name = ./WhyEduPsy.txt opened
## number of extracted terms = 458
## now making a data frame. wait a while!
stopword <- c("ある", "いう", "いく", "いける", "いる", "うる", "おく", "おる", "かや", "く", "くる", "くれる", "ここ", "こと ", "これ", "これら", "さ", "しまう", "しれる", "する", "せる", "それ", "たち", "ため", "つぎ", "つく", "どれ", "ない", "なさる", "なに", "なる", "なん", "の", "はず", "もの", "もみ", "よう", "られる", "れる", "一" )
res.wdfq.3 <- subset(res.wdfq.30, !(TERM %in% stopword))
# 多い順に表示
DT::datatable(res.wdfq.3[order(res.wdfq.3$WhyEduPsy.txt,decreasing = TRUE),])
library(igraph)
##
## Attaching package: 'igraph'
## The following objects are masked from 'package:stats':
##
## decompose, spectrum
## The following object is masked from 'package:base':
##
## union
res.cooc.10 <- NgramDF("WhyEduPsy.txt", type=1, pos = c("名詞", "動詞", "形容詞"))
## file = WhyEduPsy.txt Ngram = 2
res.cooc.11 <- subset(res.cooc.10,!(Ngram1 %in% stopword) & !(Ngram2 %in% stopword))
g <- graph.data.frame(res.cooc.11, directed = FALSE)
plot(g, vertex.size = 6, vertex.label.family="HiraKakuProN-W3",
vertex.label = V(g)$name, vertex.color = "yellow")
library(igraph)
res.cooc.20 <- NgramDF("WhyEduPsy.txt", type=1, pos = c("名詞", "動詞", "形容詞"))
## file = WhyEduPsy.txt Ngram = 2
stopword <- c("ある", "いう", "いく", "いける", "いる", "うる", "おく", "おる", "かや", "く", "くる", "くれる", "ここ", "こと ", "これ", "これら", "さ", "しまう", "しれる", "する", "せる", "それ", "たち", "ため", "つぎ", "つく", "どれ", "ない", "なさる", "なに", "なる", "なん", "の", "はず", "もの", "もみ", "よう", "られる", "れる", "一" , "教職", "過程", "就く", "者")
res.cooc.21 <- subset(res.cooc.20,!(Ngram1 %in% stopword) & !(Ngram2 %in% stopword))
res.cooc.21 <- subset(res.cooc.21, Freq > 1)
g <- graph.data.frame(res.cooc.21, directed = FALSE)
plot(g, vertex.size = 3, vertex.label.cex = 0.6,
vertex.label.family="HiraKakuProN-W3",
vertex.label = V(g)$name, vertex.color = "yellow")