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

Get list of words that are profane #30

Open
eliezerp3 opened this issue Apr 16, 2021 · 4 comments
Open

Get list of words that are profane #30

eliezerp3 opened this issue Apr 16, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@eliezerp3
Copy link

Is there any way to return a list of words that are profane instead of replacing them with characters?

@eliezerp3
Copy link
Author

Wasn't sure if that as so clear. What i mean is that something like

s = 'I want to shit and poop.'
p = profanity.get_profanity_list(s)
print(p)
// ['shit', 'poop']

@snguyenthanh
Copy link
Owner

Currently the package doesn't support this, but it sounds like a really good feature to have. You're more than welcomed to create a PR to add it in :)

A workaround I can think of is to iterate through the string, after calling .censor, and check which words have been replaced by asterisks.

@eliper3
Copy link

eliper3 commented Apr 21, 2021

Currently the package doesn't support this, but it sounds like a really good feature to have. You're more than welcomed to create a PR to add it in :)

A workaround I can think of is to iterate through the string, after calling .censor, and check which words have been replaced by asterisks.

That’s exactly what I ended up doing lol. Thanks anyway

@eliper3
Copy link

eliper3 commented Apr 21, 2021

@snguyenthanh would you be able to take a look at the latest issue (#31) as I think that is a real bug? Thank you very much and love your work!

@jcbrockschmidt jcbrockschmidt added the enhancement New feature or request label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants