Natural Language Processing | Dan Jurafsky, Christopher Manning 7๊ฐ
7 1 What is Sentiment Analysis https://youtu.be/vy0HC5H-484
7 2 Sentiment Analysis A baseline algorithm https://youtu.be/Dgqt62RQMaY
negation์ ์ฒ๋ฆฌํ๋ ํ๊ฐ์ง ์์ด๋ค.ย
P(cj)๋ ํน์ class์ ๋ฌธ์๊ฐ ์ถํํ ํ๋ฅ ์ด๋ค. P(wi | cj)๋ ํน์ class ๋ฌธ์๋ด์์ ๋จ์ด w๊ฐ ์ถํํ ํ๋ฅ ์ด๋ค. ๋ฐ์ ๊ณต์์ add one smoothing์ ์ ์ฉํ ๊ฒ์ด๋ค.
sentiment์์ ์์๋ ๋จ์ด์ถํ ์ ๋ฌด๋ ์ค์ํ๋ ์ถํํ์๋ฅผ ์ค์ํ์ง ์์๋๊ฐ ๋ง์ผ๋ฏ๋ก ์ถํ์ ๋ฌด๋ง์ ๊ฐ์ง๊ณ ๊ณ์ฐํ๋ค. ์ด๋ฐ ํํ๋ฅผ binarized (boolean feature) multinomial naive bayes๋ผ๊ณ ํ๋ค.
7 3 Sentiment Lexicons https://youtu.be/wBE0FE_2ddE
์ด๋ฏธ ์ฐ๊ตฌ์๋ค์ด ๋จ์ด๋ค์ ๋ค์ํ ๊ธฐ์ค์ ํตํด classify ํ ์๋ฃ๋ค์ด ๋ง์ด ์๋๋ฐ ์๋์์ ํ์ธ ํ ์ ์๋ค.
P(w | c)๋ฅผ P(w)๋ก ๋๋ ์ค์ผ๋ก์จ ๋ค๋ฅธ ๋จ์ด์ ๋น๊ต๊ฐ๋ฅํ๊ฒ ํ ์ ์๋ค. ์ด๋ฅผ scaled likelihood๋ผ๊ณ ํ๋ค.ย
์ ๊ทธ๋ฆผ์ ํตํด no, not, never๋ฑ์ negation ๋จ์ด๋ค์ด negative ๋ฌธ์์ ๋ณด๋ค ์์ฃผ ์ฌ์ฉ๋๊ฒ์ ์์ ์๋ค.ย
7 4 Learning Sentiment Lexicons https://youtu.be/Z7RxBcpyN1U
์ฌ๊ธฐ์๋ lexicon์ ์ง์ ๋ง๋๋ ๊ณผ์ ์ ๋ณด์ฌ์ค๋ค.
Hatzivassiloglou and McKeown ์ด ๊ฐ๋ฐํ ๋ฐฉ๋ฒ์ ์ฌ๊ธฐ์๋ ์์ ๋ฐฉ๋ฒ์ผ๋ก ์ฌ์ฉํ๋ค. ๊ธฐ๋ณธ ๋จ์ด์ and, but์ผ๋ก ์ฐ๊ฒฐ๋ ์๋ก์ด ๋จ์ด๋ค์ ์ถ๊ฐ๋ก ์ ๋ฆฌํด ๊ฐ๋ ๊ฒ์ด ๊ธฐ๋ณธ ์๋ฆฌ์ด๋ค.
ํ๋ฌ์ค๋ positive, ๋ น์์ and๋ก ์ฎ์ฌ์ง ๊ฒฝ์ฐ, ๊ตต์ ์ ์ ๋ง์ด ์ฎ์ด์ง ๊ฒฝ์ฐ. ์ ์ ์ ์ ์ but์ผ๋ก ์ฐ๊ฒฐ๋์๋ ๋จ์ด๋ค์ด๋ค.
turney algorithm์ ์ฐ์๋ phrase๋ฅผ ์ด์ฉํ๋ ๋ฐฉ๋ฒ์ด๋ค.ย
์ฐ์ ๋จ์ด๋ค์ phrase๋ก ๋ฝ์๋ด๊ณ ์ด phrase๊ฐ positive ๋จ์ด์ค์ ํ๋์ธ excellent์ ์ผ๋ง๋ ์์ฃผ ์ถํํ๋์ง PMI ๊ฐ์ ํ์ธํ๋ค. ๋ negative ๋จ์ด์์ PMI๊ฐ์ ๊ตฌํ๋ค.ย
์ด ๋๊ฐ๋ค์ ์ฐจ๊ฐ Polarity ๊ฐ์ด ๋๋ค. polarity ๊ฐ์ phrase ๊ฐ positive์ ๊ฐ๊น์ด์ง negative์ ๊ฐ๊น์ด์ง๋ฅผ ๋งํด์ค๋ค. ๋ฌธ์์์ phrase๋ค์ polarity๊ฐ์ ํ๊ท๋ด๋ฉด ๋ฌธ์๊ฐ positive ์ธ์ง negative์ธ์ง ์์ ์๋ค.ย
์ฒซ์ค ํด์ค. jj (ํ์ฉ์ฌ) ์ nn(๋ช ์ฌ), nns(๋ณต์๋ช ์ฌ)๊ฐ ์ฐ๊ฒฐ๋ ๊ฒฝ์ฐ ์ธ๋ฒ์งธ ๋จ์ด์๋ ๋ฌด๊ดํ๊ฒ ๋ชจ๋ phrase๋ก ์ถ์ถํ๋ค.ย
P(x, y)๋ ๋์์ ์ถํํ๋ ํ๋ฅ , P(x)P(y)๋ ๋ ๋จ์ด๊ฐ ๋ ๋ฆฝ์ด๋ผ๊ณ ๋ณด๊ณ ์ถํํ๋ ํ๋ฅ ์ด๋ค. ์ฆ ์์ ๋ ๋ฆฝ๋ ๋จ์ด๋ผ๊ณ ๋ณธ๊ฒฝ์ฐ์ ๋นํด ์ผ๋ง๋ ๋์์ ์ถํํ๋์ง๋ฅผ ๋ํ๋ด๋ ๋น์จ์ด๋ค.ย
ํ๋์ ๋ฌธ์์ ์กด์ฌํ๋ ๋ค์ํ phrase๋ค์ polarity๊ฐ๋ค์ ํ๊ท ๋ด๋ ๊ณผ์ ์ด๋ค.
7 5 Other Sentiment Tasks https://youtu.be/3Eo--0_ocIk
์ด๋ค ํญ๋ชฉ (aspects)์ ๊ดํ sentiment์ธ์ง๋ฅผ ํ์ธํด ๊ฐ๋ ์์
๋ฌธ์์์ ๊ฐ์ฅ ์์ฃผ ๋ฑ์ฅํ๋ ๋จ์ด๊ฐ aspect์ผ ๊ฐ๋ฅ์ฑ์ด ์๋ค. sentiment ํ์ฉ์ฌ ๋ค์ ์์ฃผ ๋ฑ์ฅํ๋ ๋จ์ด๊ฐ aspect์ผ ๊ฐ๋ฅ์ฑ์ด ์๋ค.
aspect๋ฅผ ์์์์ ์ธ๊ธํ ๋ฐฉ๋ฒ์ผ๋ก ์์ ์๋ ๊ฒฝ์ฐ. ์์ labelingํ๋ ๊ฒฝ์ฐ๋ ์๋ค.ย
data๊ฐ ๋ถ๊ท ํํ๊ฒฝ์ฐ ์ผ๋ถ๋ก ๋ง์ถฐ์ฃผ๋ ๊ฒฝ์ฐ๋ ์์์ ์๋ค. ๊ฐฏ์๋ฅผ ๋ฎ์ถ์ด ๋ง์ถ๊ธฐ๋ ํ๋ค.

















