Upgrade to Pro — share decks privately, control downloads, hide ads and more …

株式会社ブレインパッド_テクニカルナレッジ共有会#10 「ブートストラップ法による自然言語処理」白井尊昭

brainpad-inc
September 18, 2014

株式会社ブレインパッド_テクニカルナレッジ共有会#10 「ブートストラップ法による自然言語処理」白井尊昭

ブートストラップ法は、大量のテキストの中から、タグ付けをしたい単語を大量に抽出するのに役立ちます。例えば、国名を取得したい(タグ付けしたい)場合に、"Japan" などの具体的な単語をシードとして少数入力することで、同じような文脈で出現する単語を、国名だと判断してタグ付けを行います。

ここでのブートストラップ法は統計学におけるブートストラップ法とは異なり、半教師あり学習の1つで、タグ付け作業を軽減するための一般的なフレームワークを差します。

brainpad-inc

September 18, 2014
Tweet

More Decks by brainpad-inc

Other Decks in Technology

Transcript

  1. 2.シードをコーパスから検索し,文脈を列挙す る 9 コーパス No. 1 in Japan countries such

    as Japan tour of Japan プール Japan シード 「名詞(句)+前置詞(句)+検索対象の名詞(句)」や 「名詞(句)+動詞詞(句)+検索対象の名詞(句)」 などを予めテンプレートとし、テンプレートにマッチする 部分を列挙する
  2. 3.パターンを作成する 10 コーパス No. 1 in Japan countries such as

    Japan No. 1 in <名詞句> countries such as <名詞句> パターン tour of Japan tour of <名詞句> プール Japan シード
  3. 4.スコアの高いパターンのみを残す 11 コーパス No. 1 in Japan countries such as

    Japan No. 1 in <名詞句> countries such as <名詞句> パターン tour of Japan tour of <名詞句> 0.2 0.5 0.3 スコア プール Japan シード 多くのシードとより多く共起しているパターンのスコアを 高くする
  4. パターンのスコアについて[Pantel+ 06] 12 = 1 (, ) max ( )

    Nはシードの個数 自己相互情報量pmi(x,y) = log2 (,) () の初期値は1
  5. 5.パターンを用い,インスタンスを列挙する 13 コーパス No. 1 in Japan countries such as

    Japan No. 1 in <名詞句> countries such as <名詞句> パターン tour of Japan tour of <名詞句> 候補 France Russia Tokyo プール Japan シード
  6. 6.プールと各候補のスコアを計算する 14 コーパス No. 1 in Japan countries such as

    Japan No. 1 in <名詞句> countries such as <名詞句> パターン tour of Japan tour of <名詞句> 候補 France Russia Tokyo 0.5 0.3 0.1 プール Japan シード 0.8 パターンの時と同 様にスコアを付与
  7. パターン獲得とインスタンス追加を交互に繰り 返す 16 プール No. 1 in <名詞句> countries such

    as <名詞句> パターン tour of <名詞句> <名詞句> has land borders Japan シード France Russia 1.0 0.5 0.3
  8. 課題1:意味ドリフト 17 No. 1 in <名詞句> countries such as <名詞句>

    パターン tour of <名詞句> 候補 France Russia Tokyo 「tour of <名詞句>」のような、多くの候補 にマッチするようなパターン(ジェネリック パターン)を使って候補を抽出すると、獲 得対象とは無関係の語も獲得してしまう 可能性がある。 Mac OS
  9. 意味ドリフトの解決 • 相互排他的ブートストラップ – 複数のクラスに同時にブートストラップ法を適用し、 どのクラスでも候補になるような語のスコアを減ら す [Thelen+ 02] [Curran+

    07, 08] [Carlson+ 10] • ストップクラスの利用 [Kiso+ 11] – 予め意味ドリフトを起こしやすいような語(多義 語)を列挙し、獲得しない • グラフ理論の応用 [Komachi+ 10] – (ブートストラップ法ではない) 18
  10. 相互排他的ブートストラップ 19 Japan Victoria 地名の候補 人名の候補 船名の候補 George Smith Victoria

    Titanic Britannic Victoria 0.8 0.75 0.6 0.9 0.4 0.5 0.4 0.2 Linda 0.2 Paris 0.4 London 0.4 HMS Ariel 0.2 複数クラスの候補となっているVictoriaのスコアを減らしたい
  11. 相互排他的ブートストラップ 20 Japan Victoria George Smith Victoria Titanic Britannic Victoria

    0.8 0.75 0.6 0.9 0.4 0.5 0.4 0.2 Linda 0.2 Paris 0.4 London 0.4 HMS Ariel 0.2 0.1 -0.1 -0.3 クラス「地名」(LOC)における候補 の新たなスコア ′ , = , − , 他のクラス ′ Victoria, = . − max . , . = . 地名の候補 人名の候補 船名の候補
  12. 相互排他的ブートストラップ 21 Japan Paris George Smith Linda Titanic Britannic HMS

    Ariel 0.8 0.75 0.6 0.9 0.4 0.2 0.2 London 0.4 Victoria -0.1 Victoria 0.1 Victoria -0.3 0.4 クラス「地名」(LOC)における候補 の新たなスコア ′ , = , − , 他のクラス ′ Victoria, = . − max . , . = . 地名の候補 人名の候補 船名の候補
  13. 応用例:Basiliskアルゴリズム[Thelen+ 02] • MUC-4コーパス中の名詞に6クラスのタグを付与 – MUC-4コーパス(1992): ラテンアメリカ諸国におけるテロリ ズムに関する1700文書 24 クラス

    クラスメンバ数 コーパスでの割合(%) Building 188 2.2 Event 501 5.9 Human 1,856 21.9 Location 1,018 12.0 Time 112 1.3 Weapon 147 1.7 Other 4,638 54.8 ※米国防高等研究計画局(DARPA)はこんなところにも お金を出していますという例
  14. シードとのコサイン類似度順に列挙する方法 28 “Spain” のベクトル: 2 3 1 … 3 3

    1 … コサイン類似度cos , = ∙ とし, 各シードとのコサイン類似度の平均が高い順に出力する “Denmark” のベクトル: 0 0 1 … “IBM” のベクトル:
  15. Wikipediaからの語彙獲得における前処理の流 れ(例) 29 http://dumps.wikimed ia.org/enwiki/latest/e nwiki-latest-pages- articles.xml.bz2 をダウンロード WP2TXTで Wikipediaの

    本文のみを 抽出 1. 文ごとに分割 2. トークン化 • 例: “$400” -> “$”, “400” 3. トークンに品詞付与 4. フレーズにまとめる(チャン キング) • 名詞句など ステミング (Porter Stemmerなど) “stemming” -> “stem” “stemmer” -> “stem” “argued” -> “argu” “argue” -> “argu” 名詞句から修飾子(冠詞、形容詞) を除き、さらに、頻度の低い名詞句は コーパスから削除
  16. (参考): グラフ理論との関係 • Espresso 型ブートストラッピング法における意 味ドリフトのグラフ理論に基づく分析 – [小町+ 10] –

    意味ドリフトはHITSにおけるトピックドリフトである ことを指摘した – Von Neumannカーネルと正則化ラプラシアンが意 味ドリフトを抑制することを示した 30
  17. 参考文献 • [Yarowsky+ 95] – Unsupervised word sense disambiguation rivaling

    supervised methods – www.aclweb.org/anthology/P95-1026 • [Thelen+ 02] – A Bootstrapping Method for Learning Semantic Lexicons using Extraction Pattern Contexts – www.aclweb.org/anthology/W02-1028 • [Pantel+ 04] – Automatically harvesting semantic classes – www.aclweb.org/anthology/N04-1041 • [Pantel+ 06] – Espresso: leveraging generic patterns for automatically harvesting semantic relations – www.aclweb.org/anthology/P/P06/P06-1015.pdf • [Curran+ 07] – Minimising semantic drift with Mutual Exclusion Bootstrapping – sydney.edu.au/engineering/it/~james/pubs/pdf/pacling07boot.pdf 33
  18. 参考文献 • [Curran+ 08] – Weighted Mutual Exclusion Bootstrapping for

    Domain Independent Lexicon and Template Acquisition – www.aclweb.org/anthology/U/U08/U08-1013.pdf • [Komachi+ 10] – Espresso 型ブートストラッピング法における意味ドリフトのグラフ理論に基づく分析 – cl.sd.tmu.ac.jp/~komachi/papers/jsai2010-bootstrap.pdf • [Carlson+ 10] – Toward an Architecture for Never-Ending Language Learning – rtw.ml.cmu.edu/papers/carlson-aaai10.pdf • [McIntosh+ 11] – Relation Guided Bootstrapping of Semantic Lexicons – www.aclweb.org/anthology/P/P11/P11-2046.pdf • [Kiso+ 11] – HITS-based Seed Selection and Stop List Construction for Bootstrapping – www.aclweb.org/anthology/P/P11/P11-2006.pdf 34