foundations of statistical natural language processing 5. collocations

28
Foundations of Statistical Natural Language Processing 5. Collocations 米米米米米 M1 米米米 [email protected]

Upload: leola

Post on 23-Mar-2016

396 views

Category:

Documents


4 download

DESCRIPTION

Foundations of Statistical Natural Language Processing 5. Collocations. 米澤研究室 M1 増山隆 [email protected]. 概要. Collocation とは Collocation を統計的に見つけ出す方法 Frequency Mean and Variance Hypothesis testing( 仮説検定 ) The t test Hypothesis testing of difference(using the t test) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Foundations of Statistical Natural Language Processing 5. Collocations

Foundations of Statistical Natural Language Processing5. Collocations

米澤研究室 M1 増山隆[email protected]

Page 2: Foundations of Statistical Natural Language Processing 5. Collocations

概要Collocation とはCollocation を統計的に見つけ出す方法 Frequency Mean and Variance Hypothesis testing( 仮説検定 )

The t test Hypothesis testing of difference(using the t test) Pearson’s chi-square test Likelihood ratios

Page 3: Foundations of Statistical Natural Language Processing 5. Collocations

Collocation とは

Page 4: Foundations of Statistical Natural Language Processing 5. Collocations

Collocation( 連語 )複数の単語が慣習的に結びついてひとつの表現になったもの ( 例 New York)Compositional( 部分から全体の意味が分かる ) とは限らない

  例  kick the bucket ( 死ぬ )「結びつきやすさ」がある

  例  strong tea / powerful tea

Page 5: Foundations of Statistical Natural Language Processing 5. Collocations

Firth vs. Saussure & Chomsky

Saussure & Chomsky Collocation は無視されていた 文、節の構造を重視

Firth (Contextual Theory of Meaning) Context を重視

社会設定 会話の流れ Collocation

Page 6: Foundations of Statistical Natural Language Processing 5. Collocations

Collocation を統計的に見つけ出す方法

Page 7: Foundations of Statistical Natural Language Processing 5. Collocations

5.1 Frequency2 語が続いて現れる回数を数える素朴そのまま行うと of the, in the のような興味のない結果が得られる (Table 5.1)

Page 8: Foundations of Statistical Natural Language Processing 5. Collocations

Frequency + POS filter(Justeson and Katz 1995)

句になりそうな POS のパターンを与えておいて、そのパターンに合うものを抽出

cf. Table 5.2, 5.3 例  Strong tea and powerful tea

New York Times には現れなかった Web での実験では 799(strong) と 19(powerful)

であった strong,powerful どちらにも使える語に対して

はより洗練された分析が必要

Page 9: Foundations of Statistical Natural Language Processing 5. Collocations

5.2 Mean and Variance(1/2)(Smadja 1993)

2 語が同時に出現するときの距離を分析 例  knock on his door での knock に対する door の距

離は 3

距離の平均と分散を算出

分散が小さいほうがよい

Page 10: Foundations of Statistical Natural Language Processing 5. Collocations

Mean and Variance(2/2)結果は Table 5.2,5.4 Window size 9 分散が小さいとき平均距離は 0 に近い (興味のない collocation)

Smadja は急激なピークのみをとりだした だいたい 80% の出来

Collocation よりももっと緩い関係がわかる 例  knock と  door

Page 11: Foundations of Statistical Natural Language Processing 5. Collocations

5.3 Hypothesis Testing( 仮説検定 )

ある 2 語が偶然隣り合うのか決まって隣り合うのかを調べたい New companies は new も companies も出

現頻度が高いならば隣り合う確率も高い

H0 null hypothesis ( 帰無仮説 ) 統計的に正しいか調べたい命題 ここでは、「ある 2 語 w1w2 が偶然隣り合

う」 P(w1w2) = P(w1)P(w2) .. 独立性で仮定

Page 12: Foundations of Statistical Natural Language Processing 5. Collocations

The t test平均に関する検定によく使う

信頼区間 α: 棄却、採択の基準 %( ここでは0.05)

w1w2 が偶然隣り合うか ? を検定手順 1.)  以下の式で t score を計算

Page 13: Foundations of Statistical Natural Language Processing 5. Collocations

The t test手順 2) t 分布表を見る tの値が表の値より大ならば H0 を棄却

積分値が α である点

t test(image)

Page 14: Foundations of Statistical Natural Language Processing 5. Collocations

T test の計算例

New companies C(New) = 15828 C(companies) = 4675 N =14307668 ( 語の総数 ) s2=p(1-p) ~ p を使用 (cf. 2.1.9) t = 0.999932 α=0.005 の時の基準値は 2.576( 表を見る ) H0 は棄却できない ⇒ New companies は偶然並んだ

Page 15: Foundations of Statistical Natural Language Processing 5. Collocations

The t test の結果と特徴結果は表 5.6 20 回出現した 2 語の collocation 5.6 は stop word を含むほとんどの bigram で H0( 独立性の仮説 ) を棄却でき

た⇒ 言語は予測できないことはほとんどおきない。   word sence disambiguation や確率的パーズの能力の裏付け

信頼区間  α はそれほど重要ではないCollocation のランク付けもできる

Page 16: Foundations of Statistical Natural Language Processing 5. Collocations

Hypothesis testing of differences

微妙に異なる collocation の発見に使う 例 ) strong と powerful の違いを見るためにそれらの直後によく出現する語を見る

二標本 t 検定 以下の Welch の近似を使う

Page 17: Foundations of Statistical Natural Language Processing 5. Collocations

仮説と t score帰無仮説 H0 は「両者に違いがない」こと。 μ1-μ0=0

標本数は共通で N (Bernoulli 試行を N回 )以上を考慮して t を語数で表す

Page 18: Foundations of Statistical Natural Language Processing 5. Collocations

Hypothesis testing of differences の結果と応用

結果は Table 5.7 Church & Hanks(1989) 内的性質と外的性質

strong: 実際には力を持たないかもしれない。内的 powerful: 実際に力をもつ。外的

文化的な側面のような微妙なところがある 例 ) strong tea, powerful drug は tea,drug の差

応用 : 辞書作成 単語の微妙なニュアンスをつかむ

Page 19: Foundations of Statistical Natural Language Processing 5. Collocations

Pearson’s chi-square testばらつき ( 分散 ) の検定t 検定よりも適用範囲が広い

t 検定 .. サンプルが標準正規分布にしたがっていることを仮定

observed w1 = new w1 ≠ w2w2 = companies 8 4667w2 ≠ companies 15820 14287181

Expected w1 = new w1 ≠ w2w2 = companies 5.171765 4669.831w2 ≠ companies 15822.84 14287186

観測で得た表と独立性を仮定した表がマッチするか ?

Page 21: Foundations of Statistical Natural Language Processing 5. Collocations

χ2 検定の性質と応用

t 検定よりも適用範囲が広い応用 1: ある単語の翻訳語を見つける(Church & Gale 1991)例 ) vache( フランス語 ) と cow( 英語 )H0 を棄却できれば、翻訳語だといえる

応用 2: 2 コーパスの類似性の尺度 (Kilgarriff & Rose 1998)

Page 22: Foundations of Statistical Natural Language Processing 5. Collocations

Likelihood ratios( 最尤比検定 )

直感に合う (?) 方法「現実の標本は確率最大のものが実現したものだ」と仮定 ( 最尤原理 )仮説 w1w2 という bigram について H1 P(w2|w1) = p = P(w2| ¬ w1) H2 P(w2|w1)=p1≠p2=P(w2| ¬ w1)

H1 は独立性の仮説

Page 23: Foundations of Statistical Natural Language Processing 5. Collocations

Likelihood のイメージ

likelihood

0

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

probability

likeli

hood

真の確率 p に近いほど likelihood( 最尤度 ) は高い

Page 24: Foundations of Statistical Natural Language Processing 5. Collocations

Likelihood の計算 (1/2)

p,p1,p2 を得られたデータから計算

二項分布を仮定 (Bernoulli 分布 ) この値が当てはまりのよさを示す

Page 25: Foundations of Statistical Natural Language Processing 5. Collocations

Likelihood の計算 (2/2)

ただし-2logλ は漸近的に χ2 分布に従う ( らしい )

Page 26: Foundations of Statistical Natural Language Processing 5. Collocations

likelihood ratios の結果と特徴

結果は Table 5.12 結果の解釈は直感的に出来る e0.5*(-2logλ) の値をみて、どれくらいの確からしさで棄却された

かが分かる

出現回数が少ない bigram にも適用可能

Page 27: Foundations of Statistical Natural Language Processing 5. Collocations

Relative frequency ratiosコーパスを特徴づける collocation を他のコ

 ーパスたちと比較して見つける 例 1990年、 1989年の New York Times  cf. Table 5.13   1989年に頻出  1990年に 2

回  1989年の出来事、 1990年に終わったコラム

ある特定分野向けの collocation を見つける 普通の文章と特定分野の文章を比較

Page 28: Foundations of Statistical Natural Language Processing 5. Collocations

参考文献

基礎統計学 I  統計学入門自然科学の統計学 (p155 に 5.7 式の導出 ) 東京大学教養学部統計学教室編

雑なメモhttp://www10.u-page.so-net.ne.jp/dk9/mamewo/natural_language.html