Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
感情分析に使う極性辞書を生成してみる
Search
g-k
June 26, 2020
Programming
1.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
感情分析に使う極性辞書を生成してみる
g-k
June 26, 2020
Other Decks in Programming
See All in Programming
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
APNsからLive Activityを開始する話
yumnumm
0
170
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
650
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
330
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
130
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.6k
ActionController meets Protocol Buffers
sorah
0
220
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Thoughts on Productivity
jonyablonski
76
5.4k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
A Tale of Four Properties
chriscoyier
163
24k
Paper Plane
katiecoart
PRO
5
54k
Transcript
感情分析に使う 極性辞書を⽣成してみる 2020/06/26 @Menbers.data機械学習LT編 Goda kanto
⾃⼰紹介 1 • Goda Kanto • この会を主催している会社の⼈です • 機械学習に関わっているデータアナリスト •
やってみた系LTなのでゆるくお聞きください • Qiita https://qiita.com/g-k • Twitter @G_K_data
感情分析とは 2 いわゆるネガポジ分析です ポジティブ ニュートラル ネガティブ ⽂書 分類器
感情分析をやりたいと思うと 3 極性辞書ベース ディープラーニング系の教師あり学習 既存の感情分析API (Cloud Natural Languge APIとか) だいたいこの3つ⼿段を取ることになると思います
感情分析をやりたいと思うと 4 極性辞書ベース ディープラーニング系の教師あり学習 既存の感情分析API (Cloud Natural Languge APIとか) 今回は極性辞書ベースの話
いまさら極性辞書? 5 極性辞書ベース ディープラーニング系の教師あり学習 既存の感情分析API (Cloud Natural Languge APIとか) 極性辞書ベースのメリット
ü ロジックがシンプル ü 解釈が容易
超有名な極性辞書が2つ 6 やってみた系記事はだいたいこれが使⽤されている ⽇本語極性辞書 ※1 • 東北⼤学 乾・岡崎研究室が公開 • 「ネガティブ」「ポジティブ」「ニュートラル」のよう
に⽤語や単語にフラグ付けがなされる • 「⽇本語極性辞書(⽤語編)」と「⽇本語極性辞書(名詞 編)」がある • クレジット表記すれば商⽤利⽤可 単語極性対応表 ※2 • 東⼯⼤の⾼村教授が公開 • 各単語に「-1〜1」の連続的な極性値がふられている • 良い:よい:形容詞:0.999995 • 祝う:いわう:動詞:0.999122 • 酷い:ひどい:形容詞:-0.999997 • 商⽤不可 ※1 https://www.cl.ecei.tohoku.ac.jp/index.php?Open%20Resources%2FJapanese%20Sentiment%20Polarity%20Dictionary ※2 http://www.lr.pi.titech.ac.jp/~takamura/pndic_ja.html
使える極性辞書少ない問題 7 既存の極性辞書の問題点 感覚に合致しない判断が場合が多々ある チューニングが⾮常に⾯倒 全ての単語を網羅されている訳では無い
極性辞書を作ろう 8 既存の問題点を解決した極性辞書 感覚に合致しない判断が場合が多々ある チューニングが⾮常に⾯倒 全ての単語を網羅されている訳では無い fastTextを使⽤した 極性辞書の⽣成
fastTextとは? 9 • Facebookの研究チームが2015年に発表した単語分散表現獲得モデル • Word2Vecの進化系 • Word2VecにSubwordの考え⽅を追加して精度を向上させた (字⾯の近い単語同⼠により意味のまとまり持たせる) •
Word2Vecより反意語に強い(肌感)
アイデア 10 ⽇本語ウィキペディア全量を素材として学習して単語の分散表現を 得るモデルを作成
アイデア 11 各単語の「ポジティブ語群」との平均類似度と「ネガティブ語群」 との平均類似度を計算し、近い⽅を極性値として採⽤ • 優れる • 嬉しい • 喜ぶ
• 良い • 祝う • めでたい • 素敵 • 褒める …etc • 悪い • 嫌 • 苦しい • ⾟い • 死ぬ • 悲しい • 残念 • 罵る …etc 幸せ 類似度計算 類似度計算 ポジティブ 語群 ネガティブ 語群 0.70 0.23 より近い⽅を採⽤※
⽣成された極性辞書 12 Livedoorニュースコーパスの記事を形態素解析した結果の各形態素 対して先程のロジックで極性値を振りました※ ポジティブTOP10 ネガティブTOP10 ※最終的に極性値を-1〜1の間でスケーリングしています
この極性辞書の良いところ 13 先程の問題点を解消している 感覚に合致しない判断が場合が多々ある チューニングが⾮常に⾯倒 全ての単語を網羅されている訳では無い ü ネガティブ語群とポジ ティブ語群の単語を調整 するだけでOK
ü 全ての単語に極性値が割 り振られる
参考 14 同内容をQiitaにまとめているので興味のある⽅はご参照ください • 感情分析に⽤いる極性辞書を⾃動⽣成する https://qiita.com/g-k/items/1b7c765fa6520297ca7c • 感情分析でニュース記事のネガポジ度合いをスコア化する https://qiita.com/g-k/items/e49f68d7e2fed6e300ea