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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Transcript
15 slides
感情分析に使う 極性辞書を⽣成してみる 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
Other Decks in Programming
See All in Programming
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
110
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
1
470
はじめてのPLATEAU
nokonoko1203
1
650
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
140
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
680
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
170
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
350
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
180
Spec-driven Development with AI
simas
PRO
0
2.3k
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
330
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
240
将来の標準フォーマッター?ktfmtを深堀る
t45k
0
160
Featured
See All Featured
Practical Orchestrator
shlominoach
192
12k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
ラッコキーワード サービス紹介資料
rakko
5
5.9M
Into the Great Unknown - MozCon
thekraken
41
2.8k
4 Signs Your Business is Dying
shpigford
187
23k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
2
530
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k