統計解析ソフト によるテキストマイニングの学校 …統計解析ソフト...
TRANSCRIPT
─ 165 ─
������� � �������������������������
���
統計解析ソフト �によるテキストマイニングの学校現場での応用可能性�
-授業改善のためのアクション・リサーチ報告書の分析を例に�
Using the Statistical Software R for Text Mining in School Settings
- A trial analysis of a potential new tool with English class action research reports
村越� � �亮治�
MURAKOSHI Ryoji
������
� � �������������������, 2007����������������, 2000���
����������������������������������������������
�����������������������������������������������
������������������������������������������������
�����������������������������������������������
�����������������������������������������������
����������������������������������������������
����������������������������������������������
������������������������������������������������
�����������������������������������������������
��������������������������������������2006��������
������������������������������������������2007����
������������������������������������������������
�����������������������������������������������
���������������������������������������������������
���������������������������������������������
� �������������������������������WEB ������������
�������������������������������������������������
����������������������2008�����������������������
����������������������������������������������
�����������������������������
─ 166 ─
������� � �������������������������
�����������������������������
��� ������������������
� ������������ 33 ������������������������������
����������������������������������������������
������� 29 ��87.9%����������������������������������
����������������������������12��36.4%��������10��83.3%�
�������������������������������������� 12 ��36.4%��
��������������������������� 9��75.0%������
��� ������������
�����������������������������������������������
������������������������������������������������
�������� 6������������������������������� 49������
�������������������������������������������������
�����29 ��59.2%������������������������11 ��22.4%���������7
��14.3%���������������������2��4.1%��������������������
�����������4����� 8.2%�������������2�������1��������
���������
� ����������������� 23�����������������������������
�����������������, 2012��������������������������
����������������������������������������������
�����������������������������2000; 2005�������������
�����������������
1) ��������������������������
2) �����������������������
3) �����������������������������
4) ������������������������������
5) ���������������������
6) ����������������������������
7) �������������������������� � � � � � � � � � � � � � � � � � ���2005�
��������������������������������������������
─ 167 ─
������� � �������������������������
�����������������������������������������������
����������������������������������������������
������������������������������������������������
���������������������������������������������������
�������������������������������������������������
�������������������������������������������������
������������
�������������������������������������������������
������������������������������������������������
����������������������������������������������
�������������������������������������������������
����������������������������������������������
�����������������������������������������������
��������������������
��������������������
���� ���������
�����������������R����������������������� R version
2.15.2 �����R ��������������������������������������
������������������MeCab���������������������������
����������������������RMeCab�����������R �����������
MeCab�RMeCab ����������������2008�������������������R �
��������������������
���� ������
� ������������������� ID���������������1, ������2, ��
����3����������������M, ���V, �������R, �������W, �����E��
������������������������������������ “THEME” ��������
������������������������ “REFLECTION” ����������������
������������������������������� R���������csv���
��������������������������
���� ���������������
� ����������������������������������THEME���������
������������������������������������������������
─ 168 ─
������� � �������������������������
R������������������������������������������MeCab
��������������������������� RMeCab ������
� 1� R�����
� ����������� csv ����������������������������������
���������������������������RMeCabDF ( ) ������������
������RMeCabDF ������� csv ���������������� “theme”�������
��������������� “4”��������������� “�” �������� ���
“theme1” ������������������������������������������
��������������������������������� “theme2” ������ 2��
theme<-read.csv("AP_Report2011.csv")
# csv���������
theme1<-RMeCabDF(theme,4,1)�
# ��������MeCab����������
theme2<-list()
for (i in 1:length(theme1)){theme2[[i]]<-theme1[[i]][names(theme1[[i]])=="��"
|names(theme1[[i]])=="���"]}�
# ������������
� 2
��������������������������������������� THEME ���
─ 169 ─
������� � �������������������������
��������������������������������������������������
������������������������������ “TS” �������������
������������������������������������������������
� 30�������������������M��������������� 3��
theme.M <- list()
for (i in 1:length(theme2)){if(theme$TS[i] == "M") theme.M[[i]] <- theme2[[i]]}
# ��"TS"�"M"����������������
theme.M2 <- unlist(theme.M)[unlist(theme.M) != "��" & unlist(theme.M) != "��"]
# �����������
theme.M.t <- table(theme.M2)
# �����
theme.M.t[rev(order(theme.M.t))][1:30]
# �� 30������
� 3
� � 2�� 3������� R����������� 4���������������������
�������������������������������������������������
��������������������������������������������� 30�
����������������������
� 4
�
��������������������������������������������
�����������������������������������������������������
�������������������������������������������������
���������
����������������������
���� REFLECTION �����������
─ 170 ─
������� � �������������������������
� ������������������������2 �������������������
����������������������������������������������
����������������������������������������������
��������� REFLECTION ���������������������������������
����������������������������������������������
�����������������������������������������������
������������������������������������������������
�����������������������������������������������
�������������������
���� �����
� ������������csv ������ REFLECTION ��������������������
����������������������������1���������� REFLECION ��
��������� 20��������������� 5��
refl <- read.csv("AP_Report2011.csv")
# cvs������������������"refl"����
refl1 <- RMeCabDF(refl,5,1)
# csv�������������
refl2 <- list()
for (i in 1:length(refl1)){refl2[[i]] <- refl1[[i]][names(refl1[[i]]) == "��"
|names(refl1[[i]]) == "���"]}
# ������������
refl.b <- list()
for (i in 1:length(refl2)){if(refl$LEV[i] == "1") refl.b[[i]] <- refl2[[i]]}
# ��"LEV"�"1"�����������������������
refl.b2 <- unlist(refl.b)[unlist(refl.b) != "��" & unlist(refl.b) != "��"]
# �����������
refl.b.t <- table(refl.b2)
# �����
refl.b.t <- refl.b.t[rev(order(refl.b.t))][1:20]
# �� 20�����������
� 5
�������2��������3���������������������names ( ) �����
─ 171 ─
������� � �������������������������
�����������������������������������������unique ( ) ��
������������������ “AP.WB” ������������ 6 ���� 34 ������
� 6
�
��������������������������������������������������������
��������������������������������������������������������
�����������������������������������������������
���������������������������� which ( ) �������� %in% �
����������� “delete”������ “AP.WB” ��������������������
��������������� “AP.WB” ���������������������������
�����������������������������������������������
������ 7 ������������������������
delete <- which(AP.WB %in% c("��", "�", "��", "�", "��", "��", "��", "��", "��", "���
�", "��", "�", "��", "��", "��", "�", "��", "��", "��", "��", "�", "������","��",
"��", "��"))
# �����������
AP.WB <- AP.WB[ -delete]
# �����������������������
refl.b.t2 <- refl.b.t[names(refl.b.t) %in% AP.WB]
# ��������������������������������������
� 7
� ����������������������������������������������
��������������� “word”��� “id”�������� “Freq”��������������
������������������� rbind ( ) ������������������������
��������������������������������������� xtabs ( ) ���
“Freq”����“word” “id” ����������������������������������
─ 172 ─
������� � �������������������������
������ 8��
AP.DF <- data.frame(word = names(refl.b.t2), id = rep("��",length(refl.b.t2)), Freq = refl.b.t2)�
# ���������������������
AP.DF <- rbind(AP.DF, data.frame(word = names(refl.m.t2), id = rep("��",length(refl.m.t2)),
Freq = refl.m.t2),� data.frame(word = names(refl.a.t2), id = rep("��", length(refl.a.t2)), Freq =
refl.a.t2))�
# ����������������������
AP.t <- xtabs(Freq ~ word + id, data = AP.DF)�
# �������
� 8
library(MASS)�
# MASS����������
AP.corr <- corresp(AP.t, nf=2)
# �������������
biplot(AP.corr)�
# ����������
� 9
� ����� 9���������������������������������� library ( ) ��
������������� MASS �������������������RMeCab �������R
��������������������� 10���������
─ 173 ─
������� � �������������������������
� 10
�����������������������������������������������
��������������������������������������������������
���������R �������������������������������������
���������������������������������������������������
�����������������������������������������������
����������������������������������������������
�������������������������������������������������
�����������������������������������
����
���� �������������
� ���������������������������������������������
����������������������������������������������
�����������
����������������������������������������������
�����������������������������������������������
�������������������������������������������������
�����������������������������������������������
���������������������
─ 174 ─
������� � �������������������������
������������������������������������������������
������������������������������������������������
������������������������������������������������
������������������������������������������������
�����������
������������������������������������������������
�����������������������������������������������
�����������������������������������������
����������������������������������������������
�����������������������������������������������
������������������������������������������������
�������������������������������������
���� ������������������������������
� ����������������������������������������������
�����������������������������������������������
�����������������������������������������������
������������������������������������������������
��������������������
� � ����������������
� � ��������������������
� ��������������������������������������������������
�����������������������������������������������
��������������������������������������������������
��������������������������
� ��������������������������������������������R �
������������������������������������������������
�����������������������������������������������
�����������������������������������������������
��������������������������������������������������
��������������������������������������������
��������
� �����������������������������������������������
�����������������������������������������������
�����������������������������������������������
���������
─ 175 ─
������� � �������������������������
� � ���������������
� � ���������������������
� �������������������������������������������������
������������������������������������������������
���������1 �������������������������������Ngram ( ) �
�� collocate ( ) ��������������������
������
� ���������������������������������������������
���������������������������������������������
����������������������������������������������
����������������������������������������������
������������������������������������������������
������������������������������������������������
����������
������
����. (2008).�R��������������� ����.
����.�RMeCab—R � Linux �…�http://rmecab.jp/wiki/index.php?RMeCab�2012 � 10� 30 ��
��������������. (2007).�SPSS��������������� � 2 ������.
����(��). (2000).�������������������������������.
����(��). (2005).������������������������������������.
�����, Z(�)��������(��). (2006).���������������������.
����� . (2007). ����������������������������
http://www.mext.go.jp/a_menu/shotou/gakko-hyoka/08021216.htm�2012 � 10� 30 ��
�����. (2000).�������������������������������
http://www.mext.go.jp/component/a_menu/education/detail/__icsFiles/afieldfile/2010/04/06/123070
3_001.pdf�2012 � 10� 30 ��
����������������. (2012).��� 23 ��������������� ������
��������http://www.pref.kanagawa.jp/uploaded/attachment/440003.pdf�2012� 10� 13��
���������������. (2008).�R���������������.
MeCab [computer software]. http://mecab.googlecode.com/svn/trunk/mecab/doc/index.html
R version 2.15.1. [computer software]. The R Project for Statistical Computing
http://www.r-project.org/index.html�2012 � 10� 30 ��