Natural Language Processing · TEE · papers
Q1c · Sentiment feature extraction
2023-12-01 · final · recovered AI paper
Previous examination · complete worked answers
Answer
Given
I was amazed at how the product quickly it arrived. The customer service was exceptional. The support team responded promptly and professionally. I was not sad with my decision. Overall, my experience with them was outstanding.
To find
The three numerical features.
Formula: which one and why
Use word tokens after stripping punctuation, keep stopwords, and match only the supplied lexicons. Raw lexicon counting does not automatically reverse a word under negation.
Step 1. List and count every word
| Position | Word |
|---|---|
| 1 | i |
| 2 | was |
| 3 | amazed |
| 4 | at |
| 5 | how |
| 6 | the |
| 7 | product |
| 8 | quickly |
| 9 | it |
| 10 | arrived |
| 11 | the |
| 12 | customer |
| 13 | service |
| 14 | was |
| 15 | exceptional |
| 16 | the |
| 17 | support |
| 18 | team |
| 19 | responded |
| 20 | promptly |
| 21 | and |
| 22 | professionally |
| 23 | i |
| 24 | was |
| 25 | not |
| 26 | sad |
| 27 | with |
| 28 | my |
| 29 | decision |
| 30 | overall |
| 31 | my |
| 32 | experience |
| 33 | with |
| 34 | them |
| 35 | was |
| 36 | outstanding |
Step 2. Apply the logarithm
x_1=\log_{10}36=1.556302501Step 3. Count positive matches
amazed, promptly, outstanding each occur once. great does not occur. x₂=3. exceptional is not in the supplied lexicon, so it is not counted.
Step 4. Count negative matches
sad occurs once; horrible and disgusting do not. x₃=1. The phrase “not sad” remains one raw negative-lexicon occurrence under the specified feature definition.
Final answer
(x₁,x₂,x₃)=(1.556302501,3,1).