₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,324,997 members, 8,419,863 topics. Date: Thursday, 04 June 2026 at 04:18 AM

Toggle theme

Who Can Help Out With This Python Problem? - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingWho Can Help Out With This Python Problem? (1074 Views)

1 Reply (Go Down)

Who Can Help Out With This Python Problem? by TechCapon(op): 10:29am On Sep 13, 2021
Please do we have data scientists in the house? I'm working on a small project that requires me to write code in JSON format to help detect hate speech on social media (Facebook) using a few selected keywords. Please can someone just give me a sample of the code using any keywords of their choice? Thanks in advance

Cc tensazangetsu20
Re: Who Can Help Out With This Python Problem? by TechCapon(op): 2:22pm On Sep 13, 2021
Gone are the days of getting solutions on Nairaland
Re: Who Can Help Out With This Python Problem? by drealcivilceno(m): 7:22pm On Sep 13, 2021
stackoverflow and Reddit.
Re: Who Can Help Out With This Python Problem? by Bahat: 8:05pm On Sep 13, 2021
Google is your friend, folks all over the internet have solved so many Json related topics. Stackoverflow is there with other resources at your disposal.

Google is your starting point. Learn to use it if you intend to make a career out of this field.

Solution:
Your hate speech to detect will be in an array(list) or a dictionary. Loop through the list the list detect your data structure.


Eg
For(detect in my-array-list):
If my-array-list in detect:
Print debug or info.
Re: Who Can Help Out With This Python Problem? by edicied: 8:10pm On Sep 13, 2021
All of you asking op to check StackOverflow or google nawa o. What if na test to give person Job?
Re: Who Can Help Out With This Python Problem? by Bahat: 8:20pm On Sep 13, 2021
edicied:
All of you asking op to check StackOverflow or google nawa o. What if na test to give person Job?
Lol quite funny. They say you don’t need to stress yourself on problems that’s already been solved.

If you need to stress your brain power, kidding, there are alot of problems to be solved.
Re: Who Can Help Out With This Python Problem? by TechCapon(op): 8:25pm On Sep 13, 2021
Bahat:
Google is your friend, folks all over the internet have solved so many Json related topics. Stackoverflow is there with other resources at your disposal.

Google is your starting point. Learn to use it if you intend to make a career out of this field.

Solution:
Your hate speech to detect will be in an array(list) or a dictionary. Loop through the list the list detect your data structure.


Eg
For(detect in my-array-list):
If my-array-list in detect:
Print debug or info.
Bro explain this further pls
Re: Who Can Help Out With This Python Problem? by Bahat: 8:32pm On Sep 13, 2021
TechCapon:
Bro explain this further pls
Bro that’s an algorithm, if you know your python you should get it.

1)Loop through the whole array list.
2)Check your condition if true or false.

Just line looping through a file input.
You can use multi thread to make your program fast, just like those you see in the movies
Re: Who Can Help Out With This Python Problem? by bularuz(m): 10:42pm On Sep 13, 2021
TechCapon:
Please do we have data scientists in the house? I'm working on a small project that requires me to write code in JSON format to help detect hate speech on social media (Facebook) using a few selected keywords. Please can someone just give me a sample of the code using any keywords of their choice? Thanks in advance

Cc tensazangetsu20
If you are trying to do NLK processing, you should tokenize the string and analyse each word against a know sentiment file or just use textblob
Re: Who Can Help Out With This Python Problem? by edicied: 12:15pm On Sep 14, 2021
Don't use Arrays use set to get O(1) when doing lookup
Re: Who Can Help Out With This Python Problem? by Bahat: 8:01am On Nov 06, 2021
TechCapon:
Bro explain this further pls
Make a list of blacklisted words, loop through the list and check your condition, if true your function returns else it moves to the next sentence just like how channel or group bot works

Make it a function that returns any blacklisted word .
Re: Who Can Help Out With This Python Problem? by TechCapon(op): 9:26am On Nov 06, 2021
Bahat:
Make a list of blacklisted words, loop through the list and check your condition, if true your function returns else it moves to the next sentence just like how channel or group bot works

Make it a function that returns any blacklisted word .
thanks bro
Re: Who Can Help Out With This Python Problem? by funnyDM: 6:35pm On Nov 07, 2021
Just use regex, it should solve this.
1 Reply

I need assistance with this Python ProblemHelp With This Python Programming Assignment PleaseCan Someone Help Me With A Solution To This Python Problem234

Learn These Skills For FreeNetbeans 5.5 Released -- Order For A Free Copy NowAutomated Teller Machine (atm) Program