Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,815 members, 7,806,289 topics. Date: Tuesday, 23 April 2024 at 02:08 PM

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

Nairaland Forum / Science/Technology / Programming / Who Can Help Out With This Python Problem? (900 Views)

I need assistance with this Python Problem / Can Someone Help Me With A Solution To This Python Problem / Python Masters, Kindly Help Me Rectify This Python Problem. (2) (3) (4)

(1) (Reply) (Go Down)

Who Can Help Out With This Python Problem? by TechCapon(m): 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(m): 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.

1 Like

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.

2 Likes

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?

1 Like

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.

1 Like

Re: Who Can Help Out With This Python Problem? by TechCapon(m): 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

2 Likes

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

1 Like 1 Share

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 .

1 Like

Re: Who Can Help Out With This Python Problem? by TechCapon(m): 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)

Comprehensive Research Of Junior Jobs Across The World Within The Last 2 Months / Software Engineering / Whois Scripts Is Needed

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.