https://computersciencewiki.org/index.php?title=Sentiment_analysis&feed=atom&action=historySentiment analysis - Revision history2024-03-28T18:57:19ZRevision history for this page on the wikiMediaWiki 1.39.6https://computersciencewiki.org/index.php?title=Sentiment_analysis&diff=11578&oldid=prevMr. MacKenty: /* Example Tests */2022-01-24T08:01:29Z<p><span dir="auto"><span class="autocomment">Example Tests</span></span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 09:01, 24 January 2022</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l31">Line 31:</td>
<td colspan="2" class="diff-lineno">Line 31:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Coronet has the best lines of all day cruisers</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Coronet has the best lines of all day cruisers</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably positive</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably positive</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><br /></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Bertram has a deep V hull and runs easily through seas.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Bertram has a deep V hull and runs easily through seas.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:'''probably positive</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:'''probably positive</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> </del></div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><br /> </ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Pastel-colored 1980s day cruisers from Florida are ugly.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Pastel-colored 1980s day cruisers from Florida are ugly.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably negative</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably negative</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><br /></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Dinner last night was good, but not great</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' Dinner last night was good, but not great</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably neutral</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably neutral</div></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> </div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"><br /></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' I'm going to take the dog for a walk</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''User Input:''' I'm going to take the dog for a walk</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably neutral</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* '''Expected output:''' probably neutral</div></td></tr>
</table>Mr. MacKentyhttps://computersciencewiki.org/index.php?title=Sentiment_analysis&diff=11577&oldid=prevMr. MacKenty: Created page with "This a problem set for you to work through <ref>http://www.flaticon.com/</ref> This is a problem set. Some of these are easy, others are far m..."2022-01-24T08:01:08Z<p>Created page with "<a href="/index.php?title=File:Square.png" title="File:Square.png">right|frame|This a problem set for you to work through <ref>http://www.flaticon.com/</ref></a> This is a problem set. Some of these are easy, others are far m..."</p>
<p><b>New page</b></p><div>[[File:square.png|right|frame|This a problem set for you to work through <ref>http://www.flaticon.com/</ref>]]<br />
<br />
This is a problem set. Some of these are easy, others are far more difficult. The purpose of these problems sets are: <br />
<br />
# to build your skill applying computational thinking to a problem<br />
# to assess your knowledge and skills of different programming practices<br />
<br />
<br />
== What is this problem set trying to do ==<br />
<br />
You are going to look at a real-world problem, and design and construct a solution.<br />
<br />
== The Problem ==<br />
<br />
<br />
Sentiment analysis (also known as opinion mining or emotion AI) is the use of natural language processing, text analysis, computational linguistics, and biometrics to systematically identify, extract, quantify, and study affective states and subjective information.<ref>https://en.wikipedia.org/wiki/Sentiment_analysis</ref><br />
<br />
Sentiment analysis, also referred to as opinion mining, is an approach that identifies the emotional tone behind a body of text.<ref>https://searchbusinessanalytics.techtarget.com/definition/opinion-mining-sentiment-mining</ref><br />
<br />
Sentiment analysis is using a computer program to attempt to determine what a body of text means. See the section on tests to help you understand.<br />
<br />
<br />
Design and construct a program that takes as input a body of text and outputs the sentiment of that body of text. <br />
The output must be one of the following: <br />
positive <br />
negative<br />
neutral<br />
<br />
== Example Tests ==<br />
<br />
* '''User Input:''' Coronet has the best lines of all day cruisers<br />
* '''Expected output:''' probably positive<br />
<br />
* '''User Input:''' Bertram has a deep V hull and runs easily through seas.<br />
* '''Expected output:'''probably positive<br />
<br />
* '''User Input:''' Pastel-colored 1980s day cruisers from Florida are ugly.<br />
* '''Expected output:''' probably negative<br />
<br />
* '''User Input:''' Dinner last night was good, but not great<br />
* '''Expected output:''' probably neutral<br />
<br />
* '''User Input:''' I'm going to take the dog for a walk<br />
* '''Expected output:''' probably neutral<br />
<br />
== Hacker edition ==<br />
<br />
In the hacker version, design and construct sentiment analysis so that the algorithm can determine additional sentiments: <br />
<br />
enjoyment<br />
anger<br />
disgust<br />
sadness <br />
fear<br />
surprise<br />
<br />
== How you will be assessed ==<br />
<br />
Your solution will be graded using the following axis: <br />
<br />
<br />
'''Scope'''<br />
* To what extent does your code implement the features required by our specification?<br />
* To what extent is there evidence of effort?<br />
<br />
'''Correctness'''<br />
* To what extent did your code meet specifications?<br />
* To what extent did your code meet unit tests?<br />
* To what extent is your code free of bugs?<br />
<br />
'''Design'''<br />
* To what extent is your code written well (i.e. clearly, efficiently, elegantly, and/or logically)?<br />
* To what extent is your code eliminating repetition?<br />
* To what extent is your code using functions appropriately?<br />
<br />
'''Style'''<br />
* To what extent is your code readable?<br />
* To what extent is your code commented?<br />
* To what extent are your variables well named?<br />
* To what extent do you adhere to style guide?<br />
<br />
== References ==<br />
<br />
<references /><br />
<br />
== A possible solution ==<br />
<br />
<br />
<div class="toccolours mw-collapsible mw-collapsed"><br />
Click the expand link to see one possible solution, but NOT before you have tried and failed! <br />
<div class="mw-collapsible-content"><br />
<syntaxhighlight lang="python" ><br />
<br />
not yet!<br />
<br />
</syntaxhighlight><br />
<br />
</div><br />
</div><br />
<br />
[[Category:problem set]]</div>Mr. MacKenty