16. Sentiment Theory
Sentence Word Demonstration Score
I love ISS polarized word 0.577
I hate ISS polarized word 0.577
I barely love ISS deamplifier & polarized word 0.100
I really love ISS amplifier & polarized word 0.900
I am the ISS neutral 0.000
I don't love ISS negator & polarized word 0.500
I don't not love ISS negator & negator & polarized word 0.447
I love ISS and I hate mondays polarized word & polarized word 0.000
16 / 31
27. Information Search &
Extraction Theory
Document I like hate ISS
1 1 0 1
1 0 1 1
We can then weight the documents
Where: is the raw frequency of a term in a document
: total number of documents in the corpus
is the number of documents where the term appears
D1
D2
tfidf(t, d, D) = tf(t, d) ⋅ idf(t, D)
tf(t, d)
idf(t, D) = log[ ]
N
1 + |d ∈ D : t ∈ d|
N
N = | D |
|d ∈ D : t ∈ d| t
27 / 31