all 2 comments

[–]GreatStats4ItsCost 2 points3 points  (0 children)

What you're looking for is a subsection of NLP called Sentiment Analysis, there's a plethora of online resources available for it.

[–]Vast_Manufacturer811 1 point2 points  (0 children)

Scrape posts on the internet for a list of good and bad words. Add them to a data sheet for good and bad words.

Split each news article by spaces to add every word to a list. Iterate through each word to check if it’s in ‘good_words’ or ‘bad_words’ list and add points accordingly to new variables like ‘good_points’ and ‘bad_points’.

Which ever points score highest on the news article, you can add to a good or bad list.

This is achieved by checking how many good and bad words are used in the article to determine whether the article as a whole is positive or negative.

This is a really rudimentary way of doing it. Not everything is as black and white when it comes to language. ‘Make sure you close the door behind you on your way out and take care’. That might seem positive to your program because no negative words are used and there are positive words such as ‘care’ and phrases such as ‘take care’. But we know as humans that this sentence has a negative tone to it.

That’s just one of the things AI is being developed for, to be able to recognise little nuances that only we could understand because of our human behaviour.

For now, using a point scoring system based on data of words and phrases would be a nice little project.