Skip to content

Commit 570cbc4

Browse files
authored
Merge pull request #4 from freesoft/develop
Latest merge to master
2 parents aa5291c + 5626346 commit 570cbc4

File tree

2 files changed

+22
-6
lines changed

2 files changed

+22
-6
lines changed

README.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The project has Dockerfile script that you can use for Docker image build. Also,
6060

6161
### 1. build Docker image and start
6262

63-
Install (Docker)[https://www.docker.com] for your macine and checkout the git repo. Once it's ready, then run
63+
Install [Docker](https://www.docker.com) for your macine and checkout the git repo. Once it's ready, then run
6464

6565
```
6666
docker build -t uiuc-cs410-fall2018:detox .
@@ -118,8 +118,8 @@ Parameter explanation:
118118

119119
* `<username>` : Your username on Twitch.
120120
* `<client id>` : visit [https://glass.twitch.tv/](https://glass.twitch.tv/) and login with your own Twitch account. Once you create new app, you'll be able to get Client ID on Dashboard -> App section. <br/>
121-
* `<oauth2 access token>` : visit [here](https://twitchapps.com/tmi/#access_token=flwh72scl6503e6bs2xnwl6g6l5jeu&scope=chat%3Aread+chat%3Aedit+channel%3Amoderate+chat_login&token_type=bearer) and click "Connec with Twitch", and use it for `<oauth2 access token>`.
122-
* `<channel name>` : TwitchTV channel name you'd like to deploy Moira. Use the channel name you can check from web browser's url, which is generally all lowercase regardless of what you can see on twitch user's dashboard.
121+
* `<oauth2 access token>` : visit [here](https://twitchapps.com/tmi/#access_token=flwh72scl6503e6bs2xnwl6g6l5jeu&scope=chat%3Aread+chat%3Aedit+channel%3Amoderate+chat_login&token_type=bearer) and click "Connect with Twitch", and use it for `<oauth2 access token>`.
122+
* `<channel name>` : TwitchTV channel name you'd like to deploy the Detox engine. Use the channel name you can check from web browser's url, which is generally all lowercase regardless of what you can see on twitch user's dashboard.
123123

124124

125125

@@ -138,4 +138,20 @@ First line should start with following header title,
138138
and from 2nd line you can use your own data. The engine doesn't care much about the value in the "id" part and add whatever chat logs you'd like to test.
139139

140140
Training data file has similar format, but it has additional CSV column that needs to be pre-labeled by human so that it can be used for traning purpose.
141+
142+
### I'd like to know more about Twitch TV Chatbot. Where I can find the relevant docs?
143+
144+
Check out [https://dev.twitch.tv/docs/irc/guide/](https://dev.twitch.tv/docs/irc/guide/). You can find more on their [dev site](https://dev.twitch.tv/docs/.
145+
146+
### Where I can contact for aksing questions or issue to report?
147+
148+
Please [open a new issue](https://github.com/freesoft/detox_bot/issues/new) on this Github repository and I'll take a look shortly.
141149

150+
## Resources ##
151+
152+
* NLTK : https://www.nltk.org
153+
* Scikit-learn : http://scikit-learn.org
154+
* Docker : http://docker.com
155+
* Heroku : http://heroku.com
156+
* Docker Hub : http://dockerhub.com
157+

detox_engine.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Author : Wonhee Jung ( [email protected], [email protected] )
33
Since : Nov, 2018
44
5-
UIUC MCS-DS CS410 Fall 2018 Project
5+
UIUC MCS-DS CS410 Fall 2018 Project.
66
'''
77
import csv
88
import gc
@@ -121,9 +121,9 @@ def tokenizer(s):
121121
# with given parameter s, it returns whether s is toxic or not
122122
# it is not expecting any arrays, it should be just single string value
123123
def isToxic(self, s):
124-
#print("input words:", self.vectorizer.transform( np.array([s])).toarray())
124+
125125
pred = self.classifier.predict( self.vectorizer.transform( np.array([s])).toarray() )
126-
#print(pd.DataFrame(self.classifier.predict_log_proba( self.vectorizer.transform( np.array([s])).toarray() ), columns=self.classifier.classes_))
126+
127127
if pred[0] == 1:
128128
return True
129129
else:

0 commit comments

Comments
 (0)