Skip to content

Commit 744b3cf

Browse files
Merge pull request prathimacode-hub#967 from TusharAMD/CensorWordDetection
Censor word detection
2 parents 707b911 + b49716f commit 744b3cf

21 files changed

+216
-0
lines changed
Loading
Loading
Loading
24.5 KB
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Censor Word Detection
2+
3+
![Header](https://i.ibb.co/vQkYv2y/header.jpg)
4+
5+
## Aim
6+
7+
In this project I have created a python script that will alert user if he/she has written any censor/abusive/curse word and save that in text file
8+
9+
![Animation](https://github.com/TusharAMD/Awesome_Python_Scripts/blob/CensorWordDetection/GUIScripts/Censor%20Word%20Detection/Images/Screenshots/animation.gif?raw=true)
10+
![Youtube Link Here](https://youtu.be/O_Osojs7MBY)
11+
## Purpose
12+
13+
Sometimes we aren't aware of what we are writing and it is possible that in flow we write some abusive words. Such words not only affect our personal image and career but also hurts the person with whom we are having conversation with and it may lead to unnecessary disputes. Therefore using this script the users can keep monitoring themselves so that they won't write any censor words in their text.
14+
15+
## Short description of package/script
16+
17+
- For GUI Tkinter is used.
18+
- To work with Images I have used PIL library
19+
- I am using shortuuid to get unique name for files and also using date time module with that
20+
- Also using Multiprocessing so that text can be analyzed in real time and data can be saved appropriately
21+
22+
23+
## Workflow of the Project
24+
25+
1. As soon as script starts running a GUI is seen in which user has to input the text
26+
2. I am using a dataset "full list of bad words" to detect censor words
27+
3. Now this user input is checked with this list and if match is found the text is displayed in screen.
28+
4. At the same time text matter is saved in text folder which is in Utils\CurseWordsDetected\ folder
29+
5. Unique name is selected so that we can be assured that files are not overwritten
30+
6. User can correct mistakes (if any) and then can simply click save button to save text matter
31+
7. This file is then saved in Utils\InputFile, Naming conventions are same as above
32+
33+
34+
35+
## Setup instructions
36+
37+
1. Install necessary libraries from requirements.py file
38+
2. Run censor.py file
39+
3. Enter text in textbox and correct mistakes if any.
40+
4. Mistakes can be seen in terminal and all the mistakes are saved in text file also
41+
5. After satisfactory results click save button to save text and this file can be found in InputFile Folder
42+
43+
## Compilation Steps
44+
45+
This program using multiprocessing and it runs 2 functions i.e. "sensor" and "guiForCensor" simultaneously.
46+
As soon as user types in data the text is saved in temp file which is hidden and no use to the user.
47+
The changes are made there in realtime and same text data is then retrieved to evaluate whether censor words exists or not
48+
49+
\
50+
## Output
51+
52+
![Img 1](https://raw.githubusercontent.com/TusharAMD/Awesome_Python_Scripts/CensorWordDetection/GUIScripts/Censor%20Word%20Detection/Images/Screenshots/2.png)
53+
![Img 2](https://raw.githubusercontent.com/TusharAMD/Awesome_Python_Scripts/CensorWordDetection/GUIScripts/Censor%20Word%20Detection/Images/Screenshots/1.png)
54+
55+
## Author(s)
56+
57+
Tushar Amdoskar
58+
59+
[Tushar's Website](https://tusharamd.github.io/)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
damn
2+
godamn
3+
ugly
4+
shit
5+
ho
6+
ass
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
darkie
2+
nigger
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
damn
2+
godamn
3+
ugly
4+
shit
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
damn
2+
godamn
3+
shit
4+
ugly
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
damn
2+
godamn

0 commit comments

Comments
 (0)