Coding Challenge #44: AFINN-111 Sentiment Analysis - Part 2

Subscribers:
1,740,000
Published on ● Video Link: https://www.youtube.com/watch?v=VV1JmMYceJw



Duration: 16:35
22,844 views
363


In this multi-part coding challenge I implement sentiment analysis using the AFINN-111 word list. Code: https://thecodingtrain.com/challenges/44-afinn-111-sentiment-analysis

πŸ•ΉοΈ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/aNeMdpy-b

Other Parts of this Challenge:
πŸ“Ί AFINN-111 Sentiment Analysis - Part 1: https://youtu.be/uw3GbsY_Pbc

πŸŽ₯ Previous video: https://youtu.be/8Z9FRiW2Jlc?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Next video: https://youtu.be/RUSvMxxm_Jo?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

References:
πŸ”— AFINN: http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6010
πŸ”— Node.js: https://nodejs.org/
πŸ”— Express.js: http://expressjs.com/

Livestream Archive:
πŸ”΄ Coding Train Live 68: https://youtu.be/lCzB9V9L8d0?t=3059s

Related Coding Challenges:
πŸš‚ #42 Markov Chain Name Generator: https://youtu.be/eGFJ8vugIWA
πŸš‚ #48 White House Social Media Data Visualization: https://youtu.be/UrznYJltZrU

Timestamps:
0:00 Introduce the coding challenge
0:08 Load `.json` file
0:35 Add markup to receive input text
2:15 Track `textarea` in JavaScript
3:39 Split text with a regular expression
5:05 Consider the `textarea` value
5:42 Iterate through the array of words
5:57 Consider word capitalization
6:30 Check if the AFINN list includes the word
7:48 Increase score counter
8:00 Add markup to display values
8:30 Display score
8:55 Display comparative score
9:15 Display word list
10:00 Test code
11:11 Convert score to a number
12:00 Test with different inputs
13:03 Compute the total score
14:12 Summarize the coding challenge
14:35 Highlight issue with the specific technique
16:00 Conclude the coding challenge

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

πŸš‚ Website: http://thecodingtrain.com/
πŸ‘Ύ Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide
🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box
πŸ’‘ GitHub: https://github.com/CodingTrain
πŸ’¬ Discord: https://thecodingtrain.com/discord
πŸ’– Membership: http://youtube.com/thecodingtrain/join
πŸ›’ Store: https://standard.tv/codingtrain
πŸ–‹οΈ Twitter: https://twitter.com/thecodingtrain
πŸ“Έ Instagram: https://www.instagram.com/the.coding.train/

πŸŽ₯ Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: https://p5js.org
πŸ”— p5.js Web Editor: https://editor.p5js.org/
πŸ”— Processing: https://processing.org

πŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new

#sentimentanalysis #afinn111 #javascript #p5js







Tags:
JavaScript (Programming Language)
live
programming
daniel shiffman
creative coding
p5.js
coding challenge
p5.js tutorial
p5js
javascript (programming language)
tutorial
javascript
algorithms
javascript string object
js string object
programming from a to z
node
node.js
express.js
node express
api
rest api
restful api
node json
nodejs json
node.js json
sentiment analysis
afinn-111
afinn
afinn valence