Skip to content

Stance detection aims to automatically classify the stance of a text’s author towards a given target. This paper proposes a BERT-based stance detection model that encodes information from Wikipedia on the target and the sentiment of the text. The experiments on the P-Stance dataset shows that our proposed model outperforms previous models.

Notifications You must be signed in to change notification settings

WreckItBoss/W-SENTI-BERT

Repository files navigation

ファイルの構成

WikiWithSenti が本研究のモデル WS-BERT が従来研究のモデル

Data: Pstance: P-Stanceのデータセットとwikipediaの情報がが入っている VAST: VASTのデータセットとwikipediaの情報がが入っている

Results: 結果の出力場所. nohupに出力する場合はnohup.outを見て

src: datasets.py: データをモデルへ入力 engine.py: 学習と評価. Line 81, 82 で学習終了条件のコードがある. ある程度F1値が上がらない場合に学習終了. models.py: ゲーティングメカニズムなどをするところ (λが行列) train.py: 学習設定 correctmodel.py: 学会発表後にゲーティングメカニズムが上手く導入できていなかったことに気づき, 修正したもの(λが一つの値)がここには書かれている

Combining Knowledge from Wikipedia and Sentiment Information for Stance Detection

Wikipediaと感情分析を利用したスタンス検出

Dataset Preparation

PStance, COVID19-Stance 利用していない VAST.

  1. VAST このデータセットが従来研究などで一番利用されている

  2. Pstance Google Driveからデータセットをダウンロードした後、data/pstanceというフォルダーに入れ, Jupiter Notebookでデータセットの前処理を行う. preprocessing.pyをして, データの前処理を行う

  3. COVID19-Stanceこのデータセットは利用不可能

Installation

PytorchHuggingface Transformersをインストール

Run

PStance, 固有ターゲットのスタンス検出, Biden

python run_pstance_biden.py

PStance, クロスターゲット, Biden $\rightarrow$ Sanders

python run_pstance_biden2sanders.py

VAST, ゼロショット/数ショットのスタンス検出

python run_vast.py

Citation

Issei Matsumoto, Akihiro Tamura, Kato Tsuneo:
Combining knowledge from Wikipedia and sentiment information for stance detection
The 86th National Convention of IPSJ (IPSJ2024)

About

Stance detection aims to automatically classify the stance of a text’s author towards a given target. This paper proposes a BERT-based stance detection model that encodes information from Wikipedia on the target and the sentiment of the text. The experiments on the P-Stance dataset shows that our proposed model outperforms previous models.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published