SlideShare a Scribd company logo
1 of 25
推理小説のテキストマイニン
      グ
分析に用いた小説
• 明治開化 安吾捕物
 その一 舞踏会殺人事件 (195
0)
                   筆者:坂口
安吾
1章、泉山虎之介が勝海舟に事件解決の助けを求めにい
く
2章、虎之介が勝海舟に事件の内容を聞かせる。
3章.勝海舟が話を聞いてその場で犯人を推理
4章、探偵の結城新十郎が真犯人をあてる
左が青空文庫にあったテキスト、右が変形したも
登場人物紹介
抽出語をピックアップしなかった場合の出現数が多かった単語
登場人物の名前をピックアッ
プ
分析した語をピックアップした後の表
文中における単語を集計した表
対応分析(コレスポンス分析)
対応分析とは
  ・クロス集計表において行の要素
と列の要素の相関が大きくなるように
二次元空間に配置すること
  ・行と列の関係性を見ることがで
きる
  ・クロス表をもとにするので二つ
の変数の間の関係しか使用できない
1、クロス集計表を行の項目と列の項目の相関が最
大になるように行と列の双方向を並び替える
2、並び替えた表から行と列のそれぞれの相対比率
のパターンを求める
3、固有値を使って行と列の成分スコアを求める
4、成分スコアを散布図に配置する



行と列の関係を表した図ができるので行と列を見比べる




     タグ毎における出現した単語の回数の集計表
行にタグを、列に単語
を設定したのでタグと
単語の関係をみる
タグ × 抽出語   のクロス表(名詞、強制抽出語、動詞の
み)
・タグ2では事件の概要が主だったので倒れたや
駆けるなどの動作や事件に関わった人の名前が近
くに配置
・タグ4では新十郎が推理を披露し犯人を当てる
ところなのでその単語が近くに配置
多次元尺度法
・データの構造を考察する方法
・個体間の親近性データに基づいて近しいものを近くに
そうでないものを遠くに、二次元上、又は三次元上に表
して個体間の相関関係を視覚的に見る
   量的データの場合、個体間の距離を求めて距離が
近いものと遠いものを距離に基づいて配置
   質的データの場合、個体間の類似度を求めて類似
度が大きいほど個体間 の関連性が強いので近くに配置

・軸は関係なく図に配置されている個体のなかで解釈す
る
  手順
  1、各項目間の距離を測る
  2、座標値を求める
  3、2~3次元上でデータを配置
抽出語 × タグ   のクロス表(名詞、強制抽出語、動詞の
み)
名詞と強制抽出し
た語と動詞の頻度
順上位10位を対象
階層的クラスター分析
・対象間の関連性を表すデータを分析
  データのパターンが似ているもの同士
をグループにまとめてかたまり構造を把握
・樹形図と呼ばれる図を作成
・どのようにグループ分けをするかの基準
を使わずグループ分けをする




              http://mjin.doshisha.ac.jp/R/28/28.html
前段階として対応分析などで描いた図をも
とにどのように分類できるかを検討する

手順
 1、データ間の相関係数から距離や類似度を求め距
離行列を作成する
    ピアソン関数やコサイン係数を用いる
2、1を元にコーフェン行列を求める
     グループごとの距離の行列のこと(一番始
めは個体間の距離)
3、2を元に樹形図を作成する
4、2、3をグループが一つになるまで続ける
抽出語 × タグ   のクロス表(名詞、強制抽出語、動詞の
み)
ネットワーク分析
・もとは通信ネットワークや組織の編成などに使われ
ていた

・語をノードとして表現して共起性があるものを線で
つないで結び合わせたネットワークマップとして表示

 ・密度(ネットワークに含まれる関係の密さを示す
度)
        密度が大きいほどノードからのびる線が
多くなる
 ・接近中心性(ある点が他の点にどれだけ近いかを
示す指標)
 ・次数(あるノードに接している辺の数)
          の3つを計算して図に表す
     これをノードと呼
    ぶ

           http://mjin.doshisha.ac.jp/R/61/61.html
1、各単語のバイグラムを求める
    バイグラムは前後で組み合わせになっているも
の
2、そのなかで頻度が多い順に並べる
3、頻度が多いものをネットワークマップとして表示




 http://mjin.doshisha.ac.jp/R/61/61.html
文中における単語を集計した表
分析してみて分かったこと
• 推理小説の分析には対応分析が一番適し
  ている。
    →どの章でどんなことが書かれているか
がわかる
・読者が文脈から読み取らなければいけな
 いことが分析では読み取ることができな
 い。
      例えばこの小説の場合真犯人は別にいるが明確
に書かれていないので読んだ人は真犯人が誰かが推測できる
が文章を機械的に分析するだけでは分からない。

More Related Content

Featured

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 

Featured (20)

Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 

テキストマイニング (2)