Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import error #36

Open
ghost opened this issue May 1, 2021 · 6 comments
Open

Import error #36

ghost opened this issue May 1, 2021 · 6 comments

Comments

@ghost
Copy link

ghost commented May 1, 2021

Traceback (most recent call last):
File "D:/Work/Tests-Tutorials/german/TEIST.py", line 1, in
from profanity_check import predict, predict_prob
File "C:\Users\fasol\AppData\Local\Programs\Python\Python38\lib\site-packages\profanity_check_init_.py", line 1, in
from .profanity_check import predict, predict_prob
File "C:\Users\fasol\AppData\Local\Programs\Python\Python38\lib\site-packages\profanity_check\profanity_check.py", line 3, in
from sklearn.externals import joblib
ImportError: cannot import name 'joblib' from 'sklearn.externals' (C:\Users\fasol\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\externals_init_.py)

@ghost
Copy link
Author

ghost commented May 1, 2021

from profanity_check import predict, predict_prob

predict(['predict() takes an array and returns a 1 for each string if it is offensive, else 0.'])

[0]

predict(['fuck you'])

[1]

predict_prob(['predict_prob() takes an array and returns the probability each string is offensive'])

[0.08686173]

predict_prob(['go to hell, you scum'])

[0.7618861]

Code that generated it (copy paste from module site)

@travislibby000000
Copy link

Can you please help me with making a better Profanity Filtering on GitHub App

@BradKML
Copy link

BradKML commented May 2, 2021

@Logothetiz @travislibby000000 please communicate more clearly what you are trying to do.

@ghost
Copy link
Author

ghost commented May 2, 2021

I wanted to test the module to see if and how it works and to start I copy pasted the usage section of this site https://pypi.org/project/profanity-check/

@xhulianoThe1
Copy link

Found this as an alternative:

https://pypi.org/project/alt-profanity-check/

Worked for me with Python 3.8

@menkotoglou
Copy link

You can follow the alt-profanity-check package here: https://gitlab.com/dimitrios/alt-profanity-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants