@article{oai:doshisha.repo.nii.ac.jp:00019848, author = {長谷部, 陽一郎 and Hasebe, Yoichiro}, issue = {2}, journal = {言語文化, Doshisha Studies in Language and Culture}, month = {Dec}, note = {近年、コーパスを用いた言語研究の手法に多くの注目が集まっている。英語に関しては以前から、British National Corpusをはじめ、大規模なコーパスが複数存在している。また日本語を含む他のいくつかの言語に関しても、これらに匹敵する規模のコーパスの構築が進められている。しかし現時点で、研究者が自由に利用できる日本語コーパスの選択の幅は非常に限られている。要因としては、テキストデータの著作権に関する問題と、それに付随する様々な制約といったものが挙げられる。 このような状況を鑑み、本稿ではオープンソース―すなわち著作権フリーで再配布・改良自由の形式―で提供されるインターネット百科事典サイトWikipedia日本語版のデータをコーパスとして用いることを提案する。また、Wikipediaのアーカイブファイルから言語学的に有用なデータを抽出するために筆者が開発したツールキットを紹介し、解説を行う。本稿で解説するツールキットはプログラミング言語Rubyを用いて作成されており、2つのプログラムから成る。第1のプログラムwp2txt.rbは、オリジナルのXMLデータから各種のタグ類を除去するとともに、指定されたサイズのテキストファイルにデータを分割する。第2のプログラムmconc.rbは、入力ファイル中のデータを文ごとに分割するとともに、オープンソースの形態素解析システムMeCabを用いて、あらかじめ正規表現(Regular Expressions)で指定された形態素パターンとマッチするものだけをCSV形式で出力する。これにより、例えば「このツールは言語分析にかかる時間と労力を省く」といった文字列を抽出するのに、〈時間と労力を省く〉のような表層形式だけでなく、〈名詞+助詞+名詞+助詞+動詞〉のような品詞の並びによる指定や、〈時間と労力+助詞+動詞〉といったミックス形式での指定が可能になる。 Wikipedia日本語版を活用することにより、最低限の環境を整えるだけで、用例採取や言語現象の定量的分析のための大規模コーパスが得られる。また、同一の言語データを異なる研究者やプロジェクト間で共有することができる。つまり、Wikipediaコーパスは、追試・修正・拡張・応用といった試みに対し、完全に開かれた研究資源を提供するのである。このことは、日本語を対象とする様々な言語研究の可能性を大きく広げると考えられる。, Linguistic research and its methods using large-scale corpora have been attracting more and more attention in recent years. Major projects of constructing large-scale corpora are now being carried out not only for English, of which there are several major corpora such as British National Corpus, but also for many other languages. At present, however, there are few corpora of written Japanese widely available for researchers. One of the reasons why a large corpus is difficult to come by is that numerous procedures must be completed before the copyright issues are cleared. It is not a matter of just collecting a large amount of text and sharing it among researchers. There is, however, one source where a great deal of Japanese text is continually submitted and accumulated in a form that is completely open to the public. That source is Wikipedia. Although some restrictions do apply, as is the case with any other medium, Wikipedia offers quite a large set of linguistic data that reflects the present state of both the grammar and the vocabulary of the Japanese language. This is favorable for many linguistic approaches in a synchronic perspective. Moreover, since the compressed package of all the articles is published regularly for archiving purposes, it is also hoped that researchers will use these data to investigate the semi-diachronic phenomenon as well. With the above facts as background, this paper suggests a method to utilize Wikipedia in linguistic researches based on corpora of written Japanese. A computational toolkit to effectively access and analyze the text data in the archived file is presented. This toolkit is comprised of two programs written in the programming language Ruby. One, called wp2txt.rb, extracts article texts from the original XML data, and converts the bare text with Wiki and HTML tags sprinkled everywhere into plain text suitable for analysis. The other program, called mconc.rb, matches up a morphological collocation pattern (described using Regular Expressions in a configuration file) in the Wikipedia article texts. It also outputs results in CSV format so that it is able to process the data on ordinary spreadsheet application software. By using the archived data of Wikipedia and the toolkit introduced in this paper, researchers can easily retrieve examples and statistical data of a particular linguistic phenomenon. Moreover, since the Wikipedia data and the toolkit are available as open-source, the procedure of a research and its resulting data can be tested, refined, or expanded, by other researchers, making it possible for communities to build an effective inter-research network., 研究ノート(Note), application/pdf}, pages = {373--403}, title = {Wikipedia日本語版をコーパスとして用いた言語研究の手法}, volume = {9}, year = {2006}, yomi = {ハセベ, ヨウイチロウ} }